i put befor_filter :setup_user,:except=>:login in ApplicationController.rb but i want to put action login to other controller how can i do it? does rails has this support? befor_filter :setup_user,:except=>{{controller=>''user'',action=>''login''},...} -- Posted via http://www.ruby-forum.com/.
Norman Timmler
2006-Mar-23 12:05 UTC
[Rails] can befor_filter expect other controller''s action?
Am Donnerstag, den 23.03.2006, 03:44 +0100 schrieb bin.liu:> i put > befor_filter :setup_user,:except=>:login > in ApplicationController.rb > but i want to put action login to other controller > how can i do it? > does rails has this support? > befor_filter > :setup_user,:except=>{{controller=>''user'',action=>''login''},...}No it is not supported, but you could define the logic of your action in the application controller and call it from any login action of your child controllers. The question is: Do you have different login actions in your controllers? Why do you want to only exclude the login action on your user controller? -- Norman Timmler http://blog.inlet-media.de