Hi !
Hi have the following problem, and not sure about the best way to solve
this in rails. All my views are wrapped in two different layouts. These
layouts should display something like ''your are logged as '',
followed by
some user info.
As this info should appear on all actions of my app (except login /
logout), what''s the good way to pass the info from the controller to
all
views :
- When the User log in, store the User object in the session instead of
just the username ? Thus I could ask all info about the user from the
data in session.
- Define an action to be called before any action (in application.rb
just to put @current_user)
- Another way ?
Thanks in advance,
Nicolas
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---