Associations in console

if users has one profile and profiles has many schools should i be able
to
see schools at u.profiles.schools where u is a user object

On 30 Dec 2015 03:16, “fugee ohu” [email protected] wrote:

if users has one profile and profiles has many schools should i be able
to see schools at u.profiles.schools where u is a user object

No u.profiles is effectively an array. Have a look at has many through.

Colin


You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/75bfbbf7-dc86-41ed-9658-50cc7a6138f7%40googlegroups.com
.