Sha256: 630be83e2ad26188625dbfc96013b8fdf464e95866b76a2fb4ceb80e2bb37dda

Contents?: true

Size: 408 Bytes

Versions: 75

Compression:

Stored size: 408 Bytes

Contents

module Piggybak
  module ActsAsOrderer
    extend ActiveSupport::Concern

    module ClassMethods
      def acts_as_orderer
        has_many :piggybak_orders, :foreign_key => "user_id", :class_name => "::Piggybak::Order"

        has_many :order_notes, :foreign_key => "user_id", :class_name => "::Piggybak::OrderNote"
      end
    end
  end
end

::ActiveRecord::Base.send :include, Piggybak::ActsAsOrderer

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
piggybak-0.7.7 lib/acts_as_orderer.rb
piggybak-0.7.6 lib/acts_as_orderer.rb
piggybak-0.7.5 lib/acts_as_orderer.rb
piggybak-0.6.34 lib/acts_as_orderer.rb
piggybak-0.7.4 lib/acts_as_orderer.rb
piggybak-0.7.3 lib/acts_as_orderer.rb
piggybak-0.7.2 lib/acts_as_orderer.rb
piggybak-0.7.1 lib/acts_as_orderer.rb
piggybak-0.7.0 lib/acts_as_orderer.rb
piggybak-0.6.33 lib/acts_as_orderer.rb
piggybak-0.6.32 lib/acts_as_orderer.rb
piggybak-0.6.31 lib/acts_as_orderer.rb
piggybak-0.6.30 lib/acts_as_orderer.rb
piggybak-0.6.29 lib/acts_as_orderer.rb
piggybak-0.6.28 lib/acts_as_orderer.rb
piggybak-0.6.27 lib/acts_as_orderer.rb
piggybak-0.6.26 lib/acts_as_orderer.rb
piggybak-0.6.25 lib/acts_as_orderer.rb
piggybak-0.6.24 lib/acts_as_orderer.rb
piggybak-0.6.23 lib/acts_as_orderer.rb