class method
self.column_defaults
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v3.1.12Signature
self.column_defaults()
Returns a hash where the keys are column names and the values are default values when instantiating the AR object for this table.
Source
# File activerecord/lib/active_record/base.rb, line 722
def column_defaults
connection_pool.column_defaults[table_name]
end
Defined in activerecord/lib/active_record/base.rb line 722
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Base