Module: Pay::Adapter
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/pay/adapter.rb
Class Method Summary collapse
Class Method Details
.current_adapter ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/pay/adapter.rb', line 5 def self.current_adapter if ActiveRecord::Base.respond_to?(:connection_db_config) ActiveRecord::Base.connection_db_config.adapter else ActiveRecord::Base.connection_config[:adapter] end end |
.json_column_type ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/pay/adapter.rb', line 13 def self.json_column_type case current_adapter when "postgresql" :jsonb else :json end end |