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:
parent
653ec12300
commit
3ba1692eab
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue