@params not available in before_filter

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

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.

  • Rowan