Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to sql_type when type is nil #10

Open
gonzoyumo opened this issue Dec 26, 2012 · 0 comments
Open

Fallback to sql_type when type is nil #10

gonzoyumo opened this issue Dec 26, 2012 · 0 comments
Labels

Comments

@gonzoyumo
Copy link
Member

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:

#<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
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant