Sha256: b80e196c389bb6c0b44255a9fadcf1e7f5350ad1116a06f4caacfe3c1e4795ea
Contents?: true
Size: 813 Bytes
Versions: 7
Compression:
Stored size: 813 Bytes
Contents
has_dynamic_columns ============ Add dynamic columns to ActiveRecord models Installation ============ ```ruby gem 'has_dynamic_columns', :git => 'git://github.com/butchmarshall/has_dynamic_columns.git' ``` The Active Record migration is required to create the has_dynamic_columns table. You can create that table by running the following command: rails generate has_dynamic_columns:active_record rake db:migrate Usage ============ ```ruby class Account < ActiveRecord::Base has_many :customers has_dynamic_columns end class Customer < ActiveRecord::Base belongs_to :account has_many :customer_addresses has_dynamic_columns field_scope: "account", as: "fields" end class CustomerAddress < ActiveRecord::Base belongs_to :customer has_dynamic_columns field_scope: "customer.account" end ```
Version data entries
7 entries across 7 versions & 1 rubygems