Sha256: ee10731eace7cd52fcc05cac17cbe09bab17f8d4df460b398aef7ffb77140f48

Contents?: true

Size: 534 Bytes

Versions: 60

Compression:

Stored size: 534 Bytes

Contents

module ForestLiana
  module AdapterHelper
    def self.format_column_name(table_name, column_name)
      quoted_table_name = ActiveRecord::Base.connection.quote_table_name(table_name)
      quoted_column_name = ActiveRecord::Base.connection.quote_column_name(column_name)
      "#{quoted_table_name}.#{quoted_column_name}"
    end

    def self.cast_boolean(value)
      if ['MySQL', 'SQLite'].include?(ActiveRecord::Base.connection.adapter_name)
        value === 'true' ? 1 : 0;
      else
        value
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
forest_liana-2.5.4 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.5.3 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.5.2 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.5.1 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.5.0 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.9 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.8 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.7 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.6 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.5 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.4 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.3 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.2 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.1 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.4.0 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.3.5 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.3.4 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.3.3 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.3.2 app/helpers/forest_liana/adapter_helper.rb
forest_liana-2.3.1 app/helpers/forest_liana/adapter_helper.rb