Method: Wice::TableColumnMatrix#init_columns_of_table

Defined in:
lib/wice/table_column_matrix.rb

#init_columns_of_table(model) ⇒ Object Also known as: <<

:nodoc:



53
54
55
56
57
58
# File 'lib/wice/table_column_matrix.rb', line 53

def init_columns_of_table(model) #:nodoc:
  self[model] =
      HashWithIndifferentAccess.new(model.columns.map(&:dup).index_by(&:name))
  @by_table_names[model.table_name] = self[model]
  self[model].each_value { |c| c.model = model }
end