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

Undefined method `can?' #186

Open
woodardj opened this issue Dec 13, 2017 · 0 comments · May be fixed by #187
Open

Undefined method `can?' #186

woodardj opened this issue Dec 13, 2017 · 0 comments · May be fixed by #187

Comments

@woodardj
Copy link

woodardj commented Dec 13, 2017

I'm not using cancan in my app, but in koudoku/subscriptions_controller, execution is passing into the if defined?(:can?) block and throwing an undefined method error.

I'm on ruby 2.2.3 and rails 5.0.0. Here's what I get in pry:

[1] pry(main)> defined? :can?
=> "expression"

Which is actually what I get for any symbol:

[2] pry(main)> defined? :aslckjasdclkj
=> "expression"

I think the condition needs to be if defined?(:can?) == "method" or if respond_to? :can?

eyupatis added a commit to eyupatis/koudoku that referenced this issue Feb 3, 2018
@eyupatis eyupatis linked a pull request Feb 3, 2018 that will close 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 a pull request may close this issue.

1 participant