Is there a way to find the default values of a model? That tracks schema changes without requiring code changes?
Thanx, Jeffrey
Is there a way to find the default values of a model? That tracks schema changes without requiring code changes?
Thanx, Jeffrey
ModelName.columns Each column has an @default
e.g
User.columns.map{|c| c.default}
will give me the defaults for the User model. Explore a bit in the console.
Stuart, Exactly what I need.
Thank you, Jeffrey
Quoting Stuart Coyle <stuart.coyle@gmail.com>: