Sha256: d80b34d58772b9b9db7364ce270f738de50c3a1bfa4ddd3006fd297f0dd1d95a

Contents?: true

Size: 332 Bytes

Versions: 1

Compression:

Stored size: 332 Bytes

Contents

module SimpleCart
  module ActsAsSimpleCart
    extend ActiveSupport::Concern

    module ClassMethods
      def acts_as_product
        class_eval do
          has_many :order_items, class_name: 'SimpleCart::OrderItem', as: :itemable
        end
      end
    end
  end
end

ActiveRecord::Base.include(SimpleCart::ActsAsSimpleCart)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_cart-0.0.5 lib/simple_cart/acts_as_simple_cart.rb