       ajaxOptions["type"] = options.method
 
     if options["submit"]
-      $validationGroup = $this.parents("form, [data-validation-group]").first()
+      $validationGroup = if $this.is("form") then $this else $this.parents("form, [data-validation-group]").first()
       isValid = true
       $validationGroup.find(":input")
         .each( ->

    e.preventDefault()


  $(document).on "click", "a[data-ajax]", (event) ->
    
    event.preventDefault()
    $this = $(this)
    $form = $this.parents("form").first()

    options = {}
    for action in $this.data("ajax").split(",")

      -> 
        $this.removeClass("busy")
    )

  $(document).on "click", "a[data-ajax]", dataAjaxHandler
  $(document).on "submit", "form[data-ajax]", dataAjaxHandler
  

  $(document).on "change", "table input.select-all-rows", ->
