[Rails] Re: RE: has_many question
Simeon Manolov wrote in post #1127415:
> The below example allows you to jump 2 levels below 'Subject'. Probably
> you
> can try to nest these (I cannot test this right now):
>
> class Subject
> has_many :books
> has_many :chapters, through: :books
> end
>
> now subject.chapters should work. Try going further down the hierarchy
>
> Simeon
Thank you. I'll give it a try.
Dave
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/be1bf028a6958e689499e098835731c6%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home