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.
# File lib/big_record/family_span_columns.rb, line 79 def attributes_from_column_definition_with_family_span_columns self.simple_columns.inject({}) do |attributes, column| unless column.name == self.class.primary_key or column.family? attributes[column.name] = column.default end attributes end end
Returns the column object for the named attribute.
# File lib/big_record/family_span_columns.rb, line 61 def column_for_attribute_with_family_span_columns(name) name = name.to_s # ignore methods '=' and '?' (e.g. 'normalized_srf_ief:231=') return if name =~ /=|\?$/ column = column_for_attribute_without_family_span_columns(name) unless column family = BigRecord::ConnectionAdapters::Column.extract_family(name) column = self.columns_hash[family] if family end column end
Generated with the Darkfish Rdoc Generator 2.