Sha256: aa141711529c6650b584ef93b35c30159b6256f8f4d5fbe34626a74845c1ec5c

Contents?: true

Size: 301 Bytes

Versions: 8

Compression:

Stored size: 301 Bytes

Contents

module Merchant
  class Order < ActiveRecord::Base
    self.table_name = :merchant_orders
    belongs_to :user
    has_many :order_items

	  def self.generate_random_data(count = 500)
	    0.upto(count) do 
	      create(:user_id => User.random, :amount => rand(5000))      
	    end
	  end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
will_filter-5.1.4 test/dummy/app/models/merchant/order.rb
will_filter-5.1.3 test/dummy/app/models/merchant/order.rb
will_filter-5.1.2 test/dummy/app/models/merchant/order.rb
will_filter-5.1.1 test/dummy/app/models/merchant/order.rb
will_filter-5.1.0 test/dummy/app/models/merchant/order.rb
will_filter-3.1.11 test/dummy/app/models/merchant/order.rb
will_filter-3.1.10 test/dummy/app/models/merchant/order.rb
will_filter-3.1.9 test/dummy/app/models/merchant/order.rb