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

Version Path
radiant-shop-extension-0.94.8 lib/shop/models/user.rb
radiant-shop-extension-0.94.7 lib/shop/models/user.rb
radiant-shop-extension-0.94.6 lib/shop/models/user.rb
radiant-shop-extension-0.94.5 lib/shop/models/user.rb
radiant-shop-extension-0.94.4 lib/shop/models/user.rb
radiant-shop-extension-0.94.3 lib/shop/models/user.rb
radiant-shop-extension-0.94.2 lib/shop/models/user.rb
radiant-shop-extension-0.94.1 lib/shop/models/user.rb
radiant-shop-extension-0.94.0 lib/shop/models/user.rb
radiant-shop-extension-0.93.3 lib/shop/models/user.rb
radiant-shop-extension-0.93.2 lib/shop/models/user.rb
radiant-shop-extension-0.93.1 lib/shop/models/user.rb
radiant-shop-extension-0.93.0 lib/shop/models/user.rb
radiant-shop-extension-0.92.11 lib/shop/models/user.rb
radiant-shop-extension-0.92.10 lib/shop/models/user.rb
radiant-shop-extension-0.92.9 lib/shop/models/user.rb
radiant-shop-extension-0.92.8 lib/shop/models/user.rb
radiant-shop-extension-0.92.7 lib/shop/models/user.rb
radiant-shop-extension-0.92.6 lib/shop/models/user.rb
radiant-shop-extension-0.92.3 lib/shop/models/user.rb