method_missing(method, *args) public

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/configuration.rb, line 134
      def method_missing(method, *args)
        method = method.to_s.delete_suffix("=").to_sym

        if args.empty?
          if method == :rails
            return @options[method]
          else
            return @options[:rails][method]
          end
        end

        if method == :rails || args.first.is_a?(Hash)
          namespace, configuration = method, args.shift
        else
          namespace, configuration = args.shift, args.shift
          namespace = namespace.to_sym if namespace.respond_to?(:to_sym)
          @options[:rails][method] = namespace
        end

        if configuration
          aliases = configuration.delete(:aliases)
          @aliases[namespace].merge!(aliases) if aliases
          @options[namespace].merge!(configuration)
        end
      end
Register or log in to add new notes.