         $el.closest(".field")
           .addClass("error")
           .append("<small class='helper'>#{errors.join(', ')}.</small>")
-    .on "ajax:complete", ->
-      clearInterval(loadingInterval)
+ 
    $(this).attr("href") != "#"

  # Form errors
  loadingInterval = null
  loadingCount = 0
  $("form")
    .on "submit", (e, xhr) ->
      message = $(this).data("loading-text")

        $loading
          .find(".loader").text(message).end()
          .addClass "active"
    .on "ajax:error", (e, xhr) ->
      $form = $(this)
      response = JSON.parse(xhr.responseText)
