if @current_role == :intra_guest
elsif @current_role == :inter_guest
#(devise_controller? || user_signed_in?)
if request.path == "/intraOp"
@current_role = :intra_guest
elsif request.path == "/interOp"
@current_role = :inter_guest
@current_role = current_user.try(:role)
When I call http://mysite/intraOp....@current_role is set to
:intra_guest but if I click to a link, say http://mysite/other, the
@current_role in not :intra_guest anymore because the path is not
/intraOp and before_filter is run every time before an action.
I think the solution is to run set_default_role only one at
application start and not before every controller action.
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 email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.