views:

113

answers:

2

Hi all, 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

A: 

Have the same problem. Did you find any solution?

Igor Alexandrov
+1  A: 

Use view_context method insted of @template.

This is becouse in Rails 3 the new AbstractController was introduced.

You can read more here:

http://apidock.com/rails/AbstractController/Rendering/view_context

Dmitry Naumov