Skip to content
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

respond_to? doesn't return true for dynamic methods added by method_missing #26

Merged
merged 2 commits into from
Dec 5, 2013
Merged

respond_to? doesn't return true for dynamic methods added by method_missing #26

merged 2 commits into from
Dec 5, 2013

Conversation

petergoldstein
Copy link
Contributor

In both acts_as_follower and acts_as followable method_missing is overridden to add dynamic methods to the class. But respond_to? returns false when called with the symbols for these dynamic methods.

This pull request update respond_to? to behave correctly.

Please note that this pull request also contains a gemspec update required to get the tests to run green. This gemspec change was designed to just get the tests running, and it should be replaced by the gemspec changes in this pull request if they are both pulled in.

Thanks.

@petergoldstein
Copy link
Contributor Author

@tcocca Any chance you can merge this? Just rebased.

tcocca added a commit that referenced this pull request Dec 5, 2013
respond_to? doesn't return true for dynamic methods added by method_missing
@tcocca tcocca merged commit d3433c6 into tcocca:master Dec 5, 2013
@tcocca
Copy link
Owner

tcocca commented Dec 5, 2013

@petergoldstein Thanks for the help and rebasing. I just released a 0.2.1 version: http://rubygems.org/gems/acts_as_follower

@petergoldstein
Copy link
Contributor Author

@tcocca Great, thanks.

@petergoldstein petergoldstein deleted the feature/add_respond_to branch December 5, 2013 17:00
@rringler
Copy link

Thank you for this. I just bumped heads with this last night using a Draper decorated object. acts_as_follower v0.2.1 resolves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants