D
D
Damir Nurgaliev2015-05-23 09:05:29
ruby
Damir Nurgaliev, 2015-05-23 09:05:29

Question on FullCalendar on rails. Script problem?

The Events model is nested within the User model. When you go to the user profile page, the calendar itself is displayed, but there are no events in it. Here is what is written in the dev console
P9U2nNCowuQ.jpg
. Tell me, please, what is the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Renat Ibragimov, 2015-05-23
@MpaK999

/events.json - 404, which means not found, but most likely EventsController is not registered in routes.rb

V
Viktor Vsk, 2015-05-23
@viktorvsk

Your model is probably Event. Most likely, you mistyped, but it is better to be more careful about plurals, because. can be a lot of trouble in the beginning.
You need nested resources :

resources :users do
  resources :events
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question