I’m trying to use @params in a before filter, but it appears to be
nil. From the description in the API docs I understand that I should
have access to the complete request from all the filters in my
controller. What could I be doing wrong?
- Rowan
I’m trying to use @params in a before filter, but it appears to be
nil. From the description in the API docs I understand that I should
have access to the complete request from all the filters in my
controller. What could I be doing wrong?
On 11/25/05, BigSmoke [email protected] wrote:
I’m trying to use @params in a before filter, but it appears to be
nil. From the description in the API docs I understand that I should
have access to the complete request from all the filters in my
controller. What could I be doing wrong?
I found out what I was doing wrong. I was using the inline method as in
before_filter { false if @params[‘uncool’] }
instead of
before_filter { |controller| false if controller.params[‘uncool’] }
Quite stupid. I know.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs