Open woodardj opened 6 years ago
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.
if defined?(:can?)
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?
if defined?(:can?) == "method"
if respond_to? :can?
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:
Which is actually what I get for any symbol:
I think the condition needs to be
if defined?(:can?) == "method"
orif respond_to? :can?