lib/tasks/development/data/geo/geo.rake
Favor Rails.env.production?
over Rails.env == 'production'
. Open
Open
raise 'Can not be run in production' if Rails.env == 'production'
- Read upRead up
- Exclude checks
This cop checks that Rails.env is compared using .production?
-like
methods instead of equality against a string or symbol.
Example:
# bad
Rails.env == 'production'
# bad, always returns false
Rails.env == :test
# good
Rails.env.production?