You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i try to integrate rails-api with devise, it show an error like this
/Users/bobbyadiprabowo/.rvm/gems/ruby-1.9.2-p180@kulinr-rails-api/gems/devise-2.0.4/lib/devise/controllers/helpers.rb:8:in block in <module:Helpers>': undefined methodhelper_method' for ActionController::API:Class (NoMethodError)
maybe helper_method is not included in ActionController::API:Class
@tigaenamb you're right, helper_method is not included in API, and it's because we don't need it as we're not using helpers and rendering templates. I think this should be handled by devise, to not call helper_method if it does not respond to it. Another solution would be to have a stub implementation of helper_method just to ignore such errors.
@tigaenamb I've just merged an addition to the Compatibility module that adds a stub helper_method, should work fine for now. Could you give it a try bundling from master? Thanks.
Activity
carlosantoniodasilva commentedon Apr 22, 2012
@tigaenamb you're right,
helper_methodis not included in API, and it's because we don't need it as we're not using helpers and rendering templates. I think this should be handled by devise, to not call helper_method if it does not respond to it. Another solution would be to have a stub implementation of helper_method just to ignore such errors.Thanks for reporting.
carlosantoniodasilva commentedon Apr 24, 2012
@tigaenamb I've just merged an addition to the Compatibility module that adds a stub
helper_method, should work fine for now. Could you give it a try bundling from master? Thanks.bopbi commentedon Apr 24, 2012
ok, i try it later, sorry i am a little busy right now
carlosantoniodasilva commentedon Apr 24, 2012
No problem, thanks.
Merge pull request rails-api#10 from educobuci/helper_method_compatib…