-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
View helpers in rabl template throws 'undefined method' if used with gon #26
Comments
Hello! Sorry for big delay, I did whole refactoring of gon this month. So I fixed this problem with including ActionView::Helpers into Rails::Engine. Now it's only in my refactoring branch - 7a4f50f |
Using Rabl 0.8.6 (latest stable) I still have this problem. Is this issue really solved? child :whatever do
[root_url]
end Throws "undefined method root_url for Rabl::Engine" |
Sorry.. I should check what repository I am in! :D |
@mull may I ask how you solved it (I am having the same issue) |
@lulalala I can't quite remember what I changed unfortunately, I know I switched over to RablRails and then back to Rails.. heh! Sorry I can't be of any help. |
I'm getting the same error in the same case using rabl with gon in Rails undefined local variable or method `this_time' for #Rabl::Engine:0x007febee9f13c0 this_time is located in the application_helper.rb file. any workaround for this? Update: I solved including the helper in the controller |
Bumping this thread to see if there is any update on it? @gazay |
My rabl templates are working fine if I use it outside
gon
for example as a response to XHR requests, but if I use the same template withgon
it throws error in view helper methods used in therabl
templates. In Rabl, using Rails view helpers are allowed, so it seems thatgon
might be causing some issue in there, is it an issue with the view context ?Here's my sample rable template:
There seems to be an issue filed in the Rabl repository related to this problem:
nesquena/rabl#147
Thanks,
Arnab
The text was updated successfully, but these errors were encountered: