diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/command/environment_argument.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/command/environment_argument.rb b/railties/lib/rails/command/environment_argument.rb index 05eac34155..3469463db5 100644 --- a/railties/lib/rails/command/environment_argument.rb +++ b/railties/lib/rails/command/environment_argument.rb @@ -13,6 +13,12 @@ module Rails def extract_environment_option_from_argument if environment self.options = options.merge(environment: acceptable_environment(environment)) + + ActiveSupport::Deprecation.warn "Passing the environment's name as a " \ + "regular argument is deprecated and " \ + "will be removed in the next Rails " \ + "version. Please, use the -e option " \ + "instead." elsif !options[:environment] self.options = options.merge(environment: Rails::Command.environment) end |