Don't seed in production when using db:prepare (#8754)

* We don't want to do devel seeding in production mode when using db:prepare. This
PR fixes that. We can also use seeds.rb to do production seeding for new Forems
in the future.

* Just return if in production instead of wrapping the entire file in an if statement.
This commit is contained in:
Joe Doss 2020-06-18 09:39:20 -05:00 committed by GitHub
parent 653ec12300
commit 3ba1692eab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,7 @@
# rubocop:disable Rails/Output
return if Rails.env.production?
# NOTE: when adding new data, please use this class to ensure the seed tasks
# stays idempotent.
class Seeder
@ -513,4 +515,5 @@ puts <<-ASCII
All done!
ASCII
# rubocop:enable Rails/Output