Skip to content

Getting Remotipart to work with latest jquery ujs

sant0sk1 edited this page Jul 14, 2011 · 5 revisions

THIS PAGE IS MOST LIKELY OUTDATED AND SHOULD BE DELETED

Both of the pull requests in question have been merged into rails.js and I have gotten the gem working just fine without any modifications. I didn't delete it myself just because I didn't want to step on toes. :)


Remotipart currently requires an older version of the jquery-ujs. The jquery-ujs previously had a public jQuery function we could hook into called callRemote. However, in this commit, jquery-ujs was refactored and all public methods were removed, eliminating the ability to hook into and override part of the jquery-ujs functionality.

There is an updated Remotipart gem that works with the latest jquery-ujs, however, it requires two modifications to the latest jquery-ujs in order to work.

Those 2 modifications have been submitted as pull requests to rails/jquery-ujs, so hopefully this wiki won't be needed for much longer. For the curious, those 2 pull requests are here and here.

If you require Remotipart to work with the latest and greatest jquery-ujs, you can do that now by following these instructions:

  1. Replace rails.js with this fork.

  2. Put this in your Gemfile:

     gem 'remotipart', :git => 'git://github.com/JangoSteve/remotipart.git', :branch => 'latest-and-greatest'
    
  3. Run bundle install and then rails g remotipart.