Answer the question
In order to leave comments, you need to log in
Relationship of RoR models?
There are two models ( User and Calendar ). It is necessary to make a connection so that each user has his own calendar with his own (created) events. to be url /user/id1/edit_calendar for example) Thanks in advance
Answer the question
In order to leave comments, you need to log in
User
has_many :calendars
Calendar
belongs_to :user
is in the models
and the second one already said just nested-resources in the routing to prescribe
guides.rubyonrails.org/association_basics.html#the...
guides.rubyonrails.org/routing.html#nested-resources
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question