Why AJAX is not used when I submit my remote update form?
===

I have a form that will edit the record, I want it to use ajax though when submitting,

    = simple_form_for(@lesson, :html => {"data-type" => :html, :id=>'lesson_form'}, :remote=>true) do |lesson_form|

    = lesson_form.button :submit, 'Update'


but, in the `lessons` controller at `update` action, the `request.xhr?` evaluates 0, although I am setting remote to true at the form options above; `request.xhr?` dose not evaluate true

So, what I am missing here ? how to use ajax when update my record ? isn't setting remote to true enough ? any idea please ?


thanks




