Skip to content

Commit

Permalink
Merge pull request rails#22482 from ridiculous/master
Browse files Browse the repository at this point in the history
Replace ActionMailer::Base.respond_to? with respond_to_missing?
  • Loading branch information
rafaelfranca committed Dec 4, 2015
2 parents 418abd0 + 50593cc commit 8bdbf88
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions actionmailer/lib/action_mailer/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,6 @@ def deliver_mail(mail) #:nodoc:
end
end

def respond_to?(method, include_private = false) #:nodoc:
super || action_methods.include?(method.to_s)
end

protected

def set_payload_for_mail(payload, mail) #:nodoc:
Expand All @@ -566,6 +562,12 @@ def method_missing(method_name, *args) # :nodoc:
super
end
end

private

def respond_to_missing?(method, include_all = false) #:nodoc:
action_methods.include?(method.to_s)
end
end

attr_internal :message
Expand Down

0 comments on commit 8bdbf88

Please sign in to comment.