before_filter order of execution

Hi

I'm trying to use before_filter to allow access to a site. Only logged in users can view any object in the controller, but only users with a access_level higher than 2 can view specific objects. My code is:

I think instead of doing all that you could use roles , assign roles whatever access and then authorize based on roles

That would make your job easy and also would keep your code clean.

just my 2 cents

Filters changed in rails 2.0: the return value from them is ignored. A filter stops the chain if and only if it redirects or renders something.

Fred

Frederick Cheung wrote: