If the parameter is static, then won’t the result be static too? If
so, you could just put in the result.
No, as a filter has access to other variables as well.
Another example would be:
before_filter :check_authentication(:user), :only => [:list, :show]
before_filter :check_authentication(:admin), :only => [:create, :delete]
(Sure, I could go with two separate functions
(check_admin_authentication and check_user_authentication) in this
I’m sure this feature is commonly needed, so it should be implemented in
Rails. I just don’t know how to use it.