#if animikii /* Jun 02, 12:11 */
Great, this works too and I’ll use it. I like that it doesn’t get set
until I call for the variable. The only thing is I can’t restrict it
to certain actions but for my purposes this doesn’t matter because I’m
only calling it from actions where I need it so that’s good enough.
if you want to restrict access to certain actions then i suggest you
take a look at ActiveRBAC  which will allow you to quite easily
specify such restrictions, like this:
class MyController < ApplicationController
before_filter :protect_controller, :except => [ :list, :index, :show ]
def protect_controller_to_role( role )
if !session[:rbac_user_id].nil? and
User.find(session[:rbac_user_id]).has_role?( “Admin”, role )
flash[:notice] = “You are not allowed to access this page”
the above restricts access to all actions in the controller except for
list, index and show, unless they have been granted the Admin or
have a look at the manual  for more information on what can be done.
class ApplicationController < ActionController::Base
type when getting the current user.
Rails mailing list
#endif /* firstname.lastname@example.org */
I did’nt notice when the world went to shit. I was watching TV.