Re: [Rails] has_many :through
Thanks Jordon, I already read this article, and this is why I have my doubt.
On Friday, December 14, 2012 7:51:09 PM UTC-4:30, Jordon Bedwell wrote:
On Fri, Dec 14, 2012 at 5:48 PM, Jean <joso...@gmail.com> wrote:--
> I'm new in rails and I've some doubts about what kind of relationship do I
> have to use. Here the case.
>
> I have two models Offer and User, a user could apply to many offers and
> offers can have many user also the users create the offers.
>
> I think I have to use a has_many :through ralationship. for example I create
> another model "Applicant", applicant belongs_to user and belongs_to offer.
> But how is the relationship from the user and offer model? for example
Read: http://guides.rubyonrails.org/association_basics.html#the- has_and_belongs_to_many- association
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.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qz1rVEc8kTwJ.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home