I have Users that have a boolean attribute "Admin".
What I did is basically : "if admin attribute is set on false, then a
writing appears telling that 'you must be an admin to see this zone'".
I wanted to organize things differently, for example:
"if the logged user is logged, and if he has an Admin-attribute set on
true, then he may get to the requested aministration page, else, he'll
be redirected at login page".
I have a current_user method :
@current_user ||= User.find(session[:user_id]) if session[:user_id]
but I tried to add it into the controller, the model and application
controller, with just getting error.
Is it possibile to implement, in your opinion?
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 firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.