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
User Model
has_many :offer, :through => :applicantOffer Model
has_many :user, :through => :applicantMy doubt is because I already have this two relationship
User Model
has_many :offers, :dependent => :destroyOffer Model
belongs_to :userAfter solve this doubt, I guest I have to save the record in the applicant model from the applicanst_controller, right?
Thanks in advance
Thanks in advance
--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/PlDKDwbd0rEJ.
For more options, visit https://groups.google.com/groups/opt_out.