Last active
November 17, 2015 16:10
-
-
Save airspeed/1dd9ad74e40b3c4f5c88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( 1 .. 20 ).each do | i | | |
Voucher.create :code => "WoodBoard#{i}", :quantity => 151, :value => 10, :discount_type => 'NUMBER', :valid_from => Date.today, :valid_until => Date. | |
parse('2016-01-31'), :shipping_discount => false, :settings => { :products_limit => [ "clxkp002" ] } | |
Voucher.last.tap{ | g | g.settings = { :products_limit => ["CLXKP002"] } }.save | |
end | |
( 1 .. 15 ).each do | i | | |
Voucher.create :code => "wood#{i}", :quantity => 500, :value => 25, :discount_type => 'PERCENT', :valid_from => Date.today, :valid_until => Date. | |
parse('2015-12-31'), :shipping_discount => false, :settings => { :products_limit => [ "all" ] } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment