method
extract_environment_option_from_argument
v5.2.3 -
Show latest stable
- Class:
Rails::Command::EnvironmentArgument
extract_environment_option_from_argument()private
No documentation available.
# File railties/lib/rails/command/environment_argument.rb, line 18
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: acceptable_environment(options[:environment]))
else
self.options = options.merge(environment: Rails::Command.environment)
end
end