Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Dec 28, 2010
  1. Neeraj Singh

    closes #52

    neerajdotname authored
    The current code by default doest not set any HTTP ACCEPT header since I put in this commit
    
    rails@cff3fa9
    
    Now I am going to assume that you have following code
    
        def destroy
          @user = User.find(params[:id])
          @user.destroy
    
          respond_to do |format|
            format.html { redirect_to(users_url) }
            format.xml  { head :ok }
            format.js   {          }
          end
        end
    
    Note that  the index page has :remote => true
    
    <%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete, :remote => true %>
    
    If you click on Destroy then browser will send <pre>*/*</pre> and format.html will be executed. Your goal is to execute format.js.
    
    Add following lines in your javascript right after jquery is loaded.
    
    jQuery.ajaxSetup({ beforeSend: function (xhr) { xhr.setRequestHeader("Accept", "text/javascript"); } });
    
    Now format.js will be executed.
Commits on Dec 26, 2010
  1. Santiago Pastorino

    Remove ^M DOS characters

    spastorino authored
Commits on Dec 22, 2010
  1. Neeraj Singh
  2. Neeraj Singh

    formatting

    neerajdotname authored
  3. Neeraj Singh

    remove TODO

    neerajdotname authored
Commits on Dec 15, 2010
  1. Justin Schier Neeraj Singh

    Final README clarifications.

    justinschier authored neerajdotname committed
  2. Neeraj Singh

    too many issues regarding https. It is a solved

    neerajdotname authored
    problem. Use the latest version.
Commits on Dec 9, 2010
  1. Neeraj Singh
  2. Neeraj Singh

    Callback ajax:before is called before any ajax

    neerajdotname authored
    call. jQuery already provides beforeSend callback
    which jquery-ujs uses to provide ajax:beforeSend
    callback.
    
    Anything can be done in ajax:before can also be done
    in ajax:beforeSend callback.
    
    I have been attempting to get the callbacks in
    jquery-ujs close to jQuery and this was the last
    hurdle.
  3. Neeraj Singh

    jQuery provides callback named beforeSend.

    neerajdotname authored
    jquery-ujs fires ajax:loading for beforeSend.
    
    A few times I have been confused if loading is
    fired after the request has already been made or
    after.
    
    I guess the best solution is to be as close to
    jQuery as possible. No need to invent new names.
    
    This patch changes callback named ajax:loading to
    ajax:beforeSend.
  4. Neeraj Singh

    Since ajax:complete callback is fired when ajax

    neerajdotname authored
    request completes, whether the request ended
    in success or error.
    
    I do not see a need for
    another callback called ajax:after.
  5. Neeraj Singh

    bring clarity to ajax:complete callback

    neerajdotname authored
    documentation
  6. Neeraj Singh

    Be consistent with the names of callbacks

    neerajdotname authored
    jQuery ajax call has callback named error.
    jquery-ujs has callback ajax:failure.
    Changing that to ajax:error
Commits on Nov 29, 2010
  1. Neeraj Singh
Commits on Nov 27, 2010
  1. Neeraj Singh
  2. Neeraj Singh
  3. Neeraj Singh
  4. Neeraj Singh
  5. Neeraj Singh
  6. Neeraj Singh
Commits on Nov 24, 2010
  1. Neeraj Singh
  2. Neeraj Singh

    If an ajax request is being sent then

    neerajdotname authored
    HTTP_ACCEPT must have text/javascript.
    
    Fixes #52
Commits on Nov 18, 2010
  1. Neeraj Singh

    get closer to jQuery. Do not set data-type as

    neerajdotname authored
    'script' arbitrarily.
    
    Possibly might break a few apps. However passing
    data-type is always a good idea. Be in control.
Commits on Nov 15, 2010
  1. Neeraj Singh
  2. Steve Schwartz Neeraj Singh

    Added 'rails' namespace to all live and delegate event bindings.

    JangoSteve authored neerajdotname committed
    Signed-off-by: Neeraj Singh <neerajdotname@gmail.com>
Commits on Nov 14, 2010
  1. Neeraj Singh

    fix indentation

    neerajdotname authored
  2. Neeraj Singh
  3. Neeraj Singh
Commits on Nov 13, 2010
  1. Neeraj Singh
Commits on Nov 12, 2010
  1. Neeraj Singh

    fix readme link

    neerajdotname authored
  2. Neeraj Singh
  3. Neeraj Singh

    * master branch is dropping the support for jquery 1.4, 1.4.1 and 1.4…

    neerajdotname authored
    ….2 .
    
    * If you are using one of those versions then use branch v1.4 .
    * All test files have been updated to reflect the same .
  4. Neeraj Singh
Commits on Nov 2, 2010
  1. Neeraj Singh
Commits on Nov 1, 2010
  1. Neeraj Singh

    Revert "Added jquery event binding namespace 'rails' for easy unbindi…

    neerajdotname authored
    …ng of all rails jquery magic."
    
    This reverts commit a9a7b20.
Something went wrong with that request. Please try again.