class ActiveRecord::ConnectionAdapters::PostgreSQLColumn
Public Instance Methods
simplified_type_with_hstore(field_type)
click to toggle source
Adds the hstore type for the column.
# File lib/padrino-hstore/activerecord.rb, line 124 def simplified_type_with_hstore(field_type) field_type == 'hstore' ? :hstore : simplified_type_without_hstore(field_type) end
type_cast_code_with_hstore(var_name)
click to toggle source
Does the type casting from hstore columns using String#from_hstore
or Hash#from_hstore
.
# File lib/padrino-hstore/activerecord.rb, line 119 def type_cast_code_with_hstore(var_name) type == :hstore ? "#{var_name}.from_hstore" : type_cast_code_without_hstore(var_name) end