method

method_missing

rails latest stable - Class: ActionMailer::DeprecatedApi::ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

method_missing(method_symbol, *parameters)
public

No documentation available.

# File actionmailer/lib/action_mailer/deprecated_api.rb, line 60
      def method_missing(method_symbol, *parameters)
        if match = matches_dynamic_method?(method_symbol)
          case match[1]
            when 'create'
              ActiveSupport::Deprecation.warn "#{self}.create_#{match[2]} is deprecated, " <<
                "use #{self}.#{match[2]} instead", caller[0,2]
              new(match[2], *parameters).message
            when 'deliver'
              ActiveSupport::Deprecation.warn "#{self}.deliver_#{match[2]} is deprecated, " <<
                "use #{self}.#{match[2]}.deliver instead", caller[0,2]
              new(match[2], *parameters).message.deliver
            else super
          end
        else
          super
        end
      end