I was chugging along with fullcalendar in rails 3.2 on ruby 1.9.3-p320, made a few custom routes to my eventsController and then made these routes into fullcalendar eventSources
#config/routes.rb
match '/my_events', :to => 'events#my_events', :as => "my_events"
#calendar.js
{
url: '/my_events',
color: '#33FDC0',
textColor: 'black',
ignoreTimezone: true
},
#EventsController
def my_events
@events = current_user.events
respond_to do |format|
format.html # index.html.erb
format.json { render json: @events }
end
end
The events don’t show up though (although they are creating I can get to them through /events/:id and in the console).
In the JS console in Chrome I’m getting this error:
GET http://localhost:3000/my_events?start=1341118800&end=1341723600&_=1342200460434 500 (Internal Server Error)
Which on the page itself looks like this:
I didn’t figure this out, but I did fix it. I reset the database and it started working. I think some elements had no start dates and times making the whole socket konk out.