lib/ransack/adapters/active_record/3.2/context.rb
# Redefine a few things for ActiveRecord 3.2.
Redefine a few things for ActiveRecord 3.2.
Redefine a few things for ActiveRecord 3 . 2 .
def type_for(attr)
          return nil unless attr && attr.valid?
          name    = attr.arel_attribute.name.to_s
          table   = attr.arel_attribute.relation.table_name
          schema_cache = @engine.connection.schema_cache
          raise "No table named #{table} exists" unless schema_cache.table_exists?(table)
          schema_cache.columns_hash[table][name].type
        end
def type_for ( attr ) return nil unless attr && attr . valid? name = attr . arel_attribute . name . to_s table = attr . arel_attribute . relation . table_name schema_cache = @engine . connection . schema_cache raise "No table named #{table} exists" unless schema_cache . table_exists? ( table ) schema_cache . columns_hash [ table ] [ name ] . type end
Redefine a few things for ActiveRecord 3.2.
Redefine a few things for ActiveRecord 3 . 2 .
attr