New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ActionMailer::Base.respond_to? with respond_to_missing? #22482

Merged
merged 2 commits into from Dec 4, 2015

Conversation

Projects
None yet
4 participants
@ridiculous
Contributor

ridiculous commented Dec 3, 2015

This simple refactor utilizes the respond_to_missing? hook introduced in Ruby 1.9

@rails-bot

This comment has been minimized.

rails-bot commented Dec 3, 2015

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @eileencodes (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@@ -541,8 +541,8 @@ def deliver_mail(mail) #:nodoc:
end
end
def respond_to?(method, include_private = false) #:nodoc:
super || action_methods.include?(method.to_s)
def respond_to_missing?(method, include_private = false) #:nodoc:

This comment has been minimized.

@rafaelfranca

rafaelfranca Dec 3, 2015

Member

We can move this method to private section now.

@ridiculous ridiculous changed the title from Replace ActionMailer::Base#respond_to? with respond_to_missing? to Replace ActionMailer::Base.respond_to? with respond_to_missing? Dec 3, 2015

@ridiculous

This comment has been minimized.

Contributor

ridiculous commented Dec 3, 2015

rafaelfranca added a commit that referenced this pull request Dec 4, 2015

Merge pull request #22482 from ridiculous/master
Replace ActionMailer::Base.respond_to? with respond_to_missing?

@rafaelfranca rafaelfranca merged commit 8bdbf88 into rails:master Dec 4, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment