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 when trying to use custom helper methods #682

Closed
scottrobertson opened this issue Oct 20, 2016 · 1 comment
Closed

Undefined method when trying to use custom helper methods #682

scottrobertson opened this issue Oct 20, 2016 · 1 comment

Comments

@scottrobertson
Copy link

Hey

I am using rabl (via rabl-rails), with Rails 4.2.7.1 (and rails-api). I have the following:

module PaginationHelper
  def pagination
    {}
  end
end

and I am calling pagination from within rabl, and I am getting the following.

undefined local variable or method 'pagination' for #
<Rabl::Engine:0x007fbdc8735c20>

I have tried adding helper :pagination to my ApplicationController.

I have also tried looking at other issues, but they all seem to be from years ago, and are marked as resolved.

@scottrobertson
Copy link
Author

Also tried adding the method directly to the controller using helper_method but that doesnt work either.

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

No branches or pull requests

1 participant