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
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,