I am using Fullcalendar and I am trying to update events. I am trying to make an ajax callback to get permission to edit this event. The route will be / controls /: id / edit, so I built this ajax callback:
eventClick: function(date, jsEvent, view) { console.log(date.id) console.log(jsEvent) console.log(view) $.ajax({ type: "GET", url: "/controls/"+date.id+"/edit", }); $('#calendar').fullCalendar('updateEvent', event); }
The control_controller.rb code is as follows:
def edit if request.xhr? @control = Control.find(params[:id]) end end
My problem is that when I click on one event, the console tells me "Uncaught TypeError: Unable to read the" clone "property from undefined". I do not know what it means. I think I am doing it right, but it will not work. Can anybody help me? Thank you in advance.
source share