Forum: Ruby on Rails Array problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Justin H. (Guest)
on 2006-01-04 08:13
 I'm having a difficult time looking @user[:domains] from
auth_generator. Here is the output from debug:

debug(@user[:domains])

will print out:

---

TESTERS: "1"
ADMIN: "1"


But if I use @user[:domains][:TESTERS] it returns nil. How would I go
about accessing the level of each of the domains? Thanks.
Kevin O. (Guest)
on 2006-01-04 08:57
Justin Hernandez wrote:
>  I'm having a difficult time looking @user[:domains] from
> auth_generator. Here is the output from debug:
>
> debug(@user[:domains])
>
> will print out:
>
> ---
>
> TESTERS: "1"
> ADMIN: "1"
>
>
> But if I use @user[:domains][:TESTERS] it returns nil. How would I go
> about accessing the level of each of the domains? Thanks.

Try using @user[:domains]["TESTERS"]
Justin H. (Guest)
on 2006-01-04 09:10
Tried @user[:domains]["TESTERS"]. But still nothing.
This topic is locked and can not be replied to.