i've started using rails 3 beta3 and I have see that the @template variable inside controllers is nil. How I can call helpers methods inside a controller? Thx
Use the view_context
method instead of @template
.
This is because in Rails 3 the new AbstractController
was introduced.
You can read more here:
http://apidock.com/rails/AbstractController/Rendering/view_context
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With