Sha256: fe1d244666cbb6d87fe192b6a5467d102f6bbd0b690a353e912601c0de443266
Contents?: true
Size: 493 Bytes
Versions: 25
Compression:
Stored size: 493 Bytes
Contents
module Shop module Models module User def self.included(base) base.class_eval do has_one :billing, :class_name => 'ShopBilling', :as => :addressable has_one :shipping, :class_name => 'ShopShipping', :as => :addressable has_many :orders, :class_name => 'ShopOrder', :foreign_key => :customer_id accepts_nested_attributes_for :orders, :shipping, :billing end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems