   window.templateSlotCalendar = $("#calendar").fullCalendar(
     eventClick: (event, element) ->
       FormHandler.showForm(event)
-      $('#template_form form').attr('action', $('#template_form form').attr('action') + "/#{event.title}")
+      $('#template_form form').attr('action', $('#template_form form').attr('action') + "/#{event.id}")
       $('#template_form form').attr('method', 'patch')
 
     theme: false

    $('#to_time_minute').val(event.end.getMinutes())
    $('#template_slot_recurring').val(event.recurring || 0)

  showForm: (event)->
      $('#template_form').html(templateSlotForm)
      FormHandler.setFormInputsValues(event)

      $('#template_form form').on 'submit', (e) ->
        e.preventDefault()

    templateSlotCalendar.fullCalendar "unselect"
    $('#template_form').css('display', 'block')

  setFormFieldsValue: (event)->
    $('#template_slot_day').val(event.start.getDayName())
    $('#from_time_hour').val(event.start.getHours())
    $('#from_time_minute').val(event.start.getMinutes())
