Files
nairobi/lib/tasks/db.rake
Bertocq fcdc24a78c Avoid db:dev_seed log print when run from its test
The db:dev_seed rake logs info as it progresses as information for the
developer. But that's not needed when ran from its tests file, and it
bloats the travis/rspec output with unnecessary information.

Now the task will always log info unless the rake task receives an
optional argument.
2018-04-14 20:28:43 +02:00

8 lines
249 B
Ruby

namespace :db do
desc "Resets the database and loads it from db/dev_seeds.rb"
task :dev_seed, [:print_log] => [:environment] do |t, args|
@avoid_log = args[:print_log] == "avoid_log"
load(Rails.root.join("db", "dev_seeds.rb"))
end
end