Topic: ApplicationController Argument Passing
I have a method in the application controller for authenticating users, and I'm using the before_filter hook in order to call it in my other controllers...
class ApplicationController < ActionController::Base
unless session[:user_id] and session[:user_password] and session[:user_right
redirect_to(:controller => "users", :action => "login")
before_filter :authorize, :except => :login
I'd like to have a required rights parameter (int) in the class and have the before_filter hook pass it in. I've tried some things but nothing works. Symbols are still somewhat of a mystery to me; as is application inheritance.
PS. Is there a way to filter individual methods in a controller?
Last edited by circuitshaman (2006-07-13 16:07:37)
-SICP (Abelson, Sussman)