Put rake task outside production environment
This commit is contained in:
parent
f9b6f17456
commit
dedd27cf52
1 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
|
unless Rails.env.production?
|
||||||
require 'factory_girl'
|
require 'factory_girl'
|
||||||
require 'faker'
|
require 'faker'
|
||||||
|
|
||||||
task :sow => :environment do
|
task :sow => :environment do
|
||||||
users = FactoryGirl.create_list(:user, 20)
|
users = FactoryGirl.create_list(:user, 20)
|
||||||
100.times do
|
100.times do
|
||||||
|
@ -8,4 +8,4 @@ task :sow => :environment do
|
||||||
FactoryGirl.create :transaction, debtor: sample_users[0], creditor: sample_users[1], amount: 1 + rand(100)
|
FactoryGirl.create :transaction, debtor: sample_users[0], creditor: sample_users[1], amount: 1 + rand(100)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue