[Rails] Re: Associations join
Still got one(Hopefuly last for now) question, guys.
I've got the above data now and i can access my cards through users that
are joined by the cardlevel. I'm trying to loop through all the cards a
user has as such:
<% @user.cards.each do |c| %>
<%= c.name %><br>
<% end %>
And this works great. However i'd like to get some extra info about this
card from my cardlevel array, but i can't seem to access it like this. I
can however loop it in a seperate each, but i don't want that obviously.
Any ideas?
Thanks
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home