method

extract_environment_option_from_argument

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: EnvironmentArgument
extract_environment_option_from_argument() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.