RE: ACLSystem and session variables

Yeah I figured that out…i need sleep.


From: Emin H. [mailto:[email protected]]
Sent: Thursday, March 16, 2006 3:10 PM
To: [email protected]
Subject: Re: [Rails] ACLSystem and session variables

I don’t know that system, but from the code it looks like @user.roles is
a collection so you cannot simply print its value

On 3/16/06, Buntin, Seth - KATE [email protected] wrote:

I am using the ACL System that is described on the Rails wiki and I have
a quick question. I want to set the “role” as a session variable so
that I can display certain navigation schemes and I was doing it like
this:

@session[:user][:role] = @user.roles

When I print out this variable I get:

#Role:0x3262d80

How can I turn this into a readable value? I tried .to_i because I
think it is an integer but that method isn’t valid.

Thanks.

Seth

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs