Sha256: decb07899236587213db008db90c7d28121396077c959bbece89078af5ae298c

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

module Shop
  module Models
    module User
    
      def self.included(base)
        base.class_eval do
          has_many  :orders,    :class_name => 'ShopOrder', :foreign_key => :customer_id
          has_many  :billings,  :through    => :orders
          has_many  :shippings, :through    => :orders
          
          accepts_nested_attributes_for :orders, :allow_destroy => true
          
        end
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
radiant-shop-extension-0.11.6 lib/shop/models/user.rb