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.
96f1424b2c860b42c39ed79178fdb206?d=identicon&s=25 Justin Hernandez (jhernandez)
on 2006-01-04 07: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.
C8a634a01a2c4508360874bff7fb1a7f?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-01-04 07: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"]
96f1424b2c860b42c39ed79178fdb206?d=identicon&s=25 Justin Hernandez (jhernandez)
on 2006-01-04 08:10
Tried @user[:domains]["TESTERS"]. But still nothing.
This topic is locked and can not be replied to.