Open gonzoyumo opened 11 years ago
When using some DB specific data type that rails doesn't know, Model's column type is nil. But there's also an attribute called sql_stype which could be used as fallback when type is unknown.
sql_stype
Here is a sample model column using a PG custom TYPE:
#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x007f875a33c2d0 @name="notification_frequency", @sql_type="users_notification_frequencies", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=nil, @default="weekly", @primary=false, @coder=nil >
When using some DB specific data type that rails doesn't know, Model's column type is nil. But there's also an attribute called
sql_stype
which could be used as fallback when type is unknown.Here is a sample model column using a PG custom TYPE: