Skip to content

View Helpers not Working in Rails 3.1 #147

Closed
JackCA opened this Issue Jan 15, 2012 · 6 comments

4 participants

@JackCA
JackCA commented Jan 15, 2012

I've got a setup like follows:
node do |i|
{ created: time_ago_in_words(i.created_at)}
end

and am receiving the following error:
```undefined method 'time_ago_in_words' for #Rabl::Engine:0x007fdeb3956ca0


I am using the head version of Rabl.
Is there something more I have to do to include such type of view helpers?
@nesquena
Owner

Which version of rabl are you using? Try 0.5.5.j and let me know if the problem persists...

@brian-mann

Does not work with 0.5.5.j either.

@brian-mann

Actually this is an issue related to the gon gem. Once I prevent passing the rabl json to gon it works fine. I'm looking into this further.

@nesquena
Owner

Any update? Is this a rabl problem?

@gazay
gazay commented Apr 17, 2012

Sorry for delay, I just released gon gem version 3.0.0 where I fixed this problem with including ActionView::Helpers into Rabl::Engine. I cloned repo of Rabl and ran specs with including this helpers - all specs passed except one, which not related to my changes, so I think I'm not affect any functionality of Rabl.

@nesquena
Owner

OK, I am going to close this issue, thanks!

@nesquena nesquena closed this Apr 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.