Topic: Instance variable set in after_filter is not available in view
Instance variable set in after_filter is not available in a view.
When I set a instance variable in a filter
class Admin::CarMakeController < Admin::BaseController
@abcdef = "set in filter"
I cannot access it in the view. It's nil/empty.
The filter is being run (tested it with 'render_text'). When I set this variable in action, it is available in views.
Manual says that :
Filters have access to the request, response, and all the instance variables set by other filters in the chain or by the action (in the case of after filters).
so they are able to set instance variables too.
Am I missing something
Thanks for help
I'll answer myself -- you cant set @variable in after_filter
Last edited by dr_bonzo (2006-11-24 16:59:28)