Giles Bowkett
2006-Apr-22 23:53 UTC
[Rails] put variable in session each time any controller runs?
Hi -- well, that''s what I''m trying to do. Does anyone know what the best way to do it is? I have three controllers, each one has a hidden tag, and I want each one to salt its respective tag with the name of the action in effect, at the time that action runs, for every action in the controller. -- Giles Bowkett http://www.gilesgoatboy.org
Rob Merrell
2006-Apr-23 00:28 UTC
[Rails] put variable in session each time any controller runs?
Giles, You might want to check out using before or after filters. The Agile Dev book has a really good section on them. Rob On 4/22/06, Giles Bowkett <gilesb@gmail.com> wrote:> > Hi -- well, that''s what I''m trying to do. Does anyone know what the > best way to do it is? I have three controllers, each one has a hidden > tag, and I want each one to salt its respective tag with the name of > the action in effect, at the time that action runs, for every action > in the controller. > > -- > Giles Bowkett > http://www.gilesgoatboy.org > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- c++: the power, elegance and simplicity of a hand grenade http://www.migrob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060423/ffe7751c/attachment-0001.html
Giles Bowkett
2006-Apr-23 00:47 UTC
[Rails] put variable in session each time any controller runs?
Hi Rob -- that looks exactly right. Thanks! ^_^ On 4/22/06, Rob Merrell <robholio@gmail.com> wrote:> Giles, > > You might want to check out using before or after filters. The Agile Dev > book has a really good section on them. > > Rob > > > On 4/22/06, Giles Bowkett <gilesb@gmail.com> wrote: > > > Hi -- well, that''s what I''m trying to do. Does anyone know what the > best way to do it is? I have three controllers, each one has a hidden > tag, and I want each one to salt its respective tag with the name of > the action in effect, at the time that action runs, for every action > in the controller. > > -- > Giles Bowkett > http://www.gilesgoatboy.org > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > c++: the power, elegance and simplicity of a hand grenade > http://www.migrob.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Giles Bowkett http://www.gilesgoatboy.org