Permalink
Commits on Dec 28, 2010
  1. closes #52

    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.
    Neeraj Singh committed Dec 28, 2010
Commits on Dec 26, 2010
  1. Remove ^M DOS characters

    spastorino committed Dec 26, 2010
Commits on Dec 22, 2010
  1. formatting

    Neeraj Singh committed Dec 22, 2010
  2. remove TODO

    Neeraj Singh committed Dec 22, 2010
Commits on Dec 15, 2010
  1. Final README clarifications.

    justinschier committed with Neeraj Singh Dec 9, 2010
  2. too many issues regarding https. It is a solved

    problem. Use the latest version.
    Neeraj Singh committed Dec 15, 2010
Commits on Dec 9, 2010
  1. remove ajax:before from the documentation

    Neeraj Singh committed Nov 27, 2010
  2. Callback ajax:before is called before any ajax

    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.
    Neeraj Singh committed Nov 27, 2010
  3. jQuery provides callback named beforeSend.

    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.
    Neeraj Singh committed Nov 24, 2010
  4. Since ajax:complete callback is fired when ajax

    request completes, whether the request ended
    in success or error.
    
    I do not see a need for
    another callback called ajax:after.
    Neeraj Singh committed Nov 24, 2010
  5. bring clarity to ajax:complete callback

    documentation
    Neeraj Singh committed Nov 24, 2010
  6. Be consistent with the names of callbacks

    jQuery ajax call has callback named error.
    jquery-ujs has callback ajax:failure.
    Changing that to ajax:error
    Neeraj Singh committed Nov 24, 2010
Commits on Nov 29, 2010
  1. Remove trailing spaces and check for right version

    closes #51
    Neeraj Singh committed Nov 29, 2010
Commits on Nov 27, 2010
  1. Add comment to add where the assertion is actually

    taking place
    Neeraj Singh committed Nov 27, 2010
  2. remove unused markup from test file

    Neeraj Singh committed Nov 27, 2010
  3. remove unused markup from test file

    Neeraj Singh committed Nov 27, 2010
  4. remove the unused @app_base_url

    Neeraj Singh committed Nov 27, 2010
  5. fix the wrong module name inside test

    Neeraj Singh committed Nov 27, 2010
  6. add comments to data-method

    Neeraj Singh committed Nov 27, 2010
Commits on Nov 24, 2010
  1. fix module name in test file

    Neeraj Singh committed Nov 24, 2010
  2. If an ajax request is being sent then

    HTTP_ACCEPT must have text/javascript.
    
    Fixes #52
    Neeraj Singh committed Nov 24, 2010
Commits on Nov 18, 2010
  1. get closer to jQuery. Do not set data-type as

    'script' arbitrarily.
    
    Possibly might break a few apps. However passing
    data-type is always a good idea. Be in control.
    Neeraj Singh committed Nov 18, 2010
Commits on Nov 15, 2010
  1. respect global ajaxSettings declared via $.ajaxSetup

    Neeraj Singh committed Nov 15, 2010
  2. Added 'rails' namespace to all live and delegate event bindings.

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

    Neeraj Singh committed Nov 14, 2010
  2. add ; to fix lint warning

    Neeraj Singh committed Nov 14, 2010
  3. remove lint warning by replacing != with !==

    Neeraj Singh committed Nov 14, 2010
Commits on Nov 13, 2010
  1. add rubygems.org to Gemfile and Gemfile.lock

    Neeraj Singh committed Nov 13, 2010
Commits on Nov 12, 2010
  1. fix readme link

    Neeraj Singh committed Nov 12, 2010
  2. * master branch is dropping the support for jquery 1.4, 1.4.1 and 1.4…

    ….2 .
    
    * If you are using one of those versions then use branch v1.4 .
    * All test files have been updated to reflect the same .
    Neeraj Singh committed Nov 12, 2010
  3. add comments at the top. prepare to create a branch for lower version…

    … of jquery
    Neeraj Singh committed Nov 12, 2010
Commits on Nov 2, 2010
  1. add support for confirmation for button. closes issue #14

    Neeraj Singh committed Nov 2, 2010
Commits on Nov 1, 2010
  1. Revert "Added jquery event binding namespace 'rails' for easy unbindi…

    …ng of all rails jquery magic."
    
    This reverts commit a9a7b20.
    Neeraj Singh committed Nov 1, 2010