Sha256: b39a12fc42a4f327124e2fe75228236c1fc4330695aa527ab3b0e1f3602593db

Contents?: true

Size: 515 Bytes

Versions: 25

Compression:

Stored size: 515 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 ActiveRecord::Base.connection.adapter_name == 'MySQL'
        value === 'true' ? 1 : 0;
      else
        value
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
forest_liana-1.6.10 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.7 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.6 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.5 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.4 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.3 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.2 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.1 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.6.0 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.26 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.25 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.24 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.23 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.22 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.21 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.20 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.19 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.18 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.17 app/helpers/forest_liana/adapter_helper.rb
forest_liana-1.5.16 app/helpers/forest_liana/adapter_helper.rb