Module | BigRecord::DynamicSchema |
In: |
lib/big_record/dynamic_schema.rb
|
Initializes the attributes array with keys matching the columns from the linked table and the values matching the corresponding default value of that column, so that a new instance, or one populated from a passed-in Hash, still has all the attributes that instances loaded from the database would.
Called on first read access to any given column and generates reader methods for all columns in the columns_hash if ActiveRecord::Base.generate_read_methods is set to true.