+---------------------------------------------------------------------+ | Version of remotipart.js | is compatible with versions of rails.js* | +---------------------------------------------------------------------+ | <= 0.3.1 | <= 498b35e24cdb14f2 | | 0.3.2 | > 498b35e24cdb14f2, <= 7f2acc1811f62877 | | 0.3.3 | > 7f2acc1811f62877, <= d2abd6f9df4e4a42 | | >= 0.3.4 | > d2abd6f9df4e4a42 | (current version of rails.js) +---------------------------------------------------------------------+
*rails.js versions (For a full list of Rails.js]versions and diffs, see {Rails jQuery UJS Changelog}[https://github.com/rails/jquery-ujs/blob/master/CHANGELOG.md]):
Prerequisite: Make sure you have a supported jquery-ujs (rails.js) version from the previous section.
-
Install the Remotipart gem
-
Add this line to your GEMFILE (add the correct version from previous section if needed)
gem 'remotipart'
-
And run
bundle install
-
-
Run the Remotipart generator to add jquery.remotipart.js to public/javascripts/
rails g remotipart
-
Add the Javascript files for jQuery, the Rails jQuery driver, jQuery Form plugin, and Remotipart to your template, making sure to include jquery.remotipart.js after jQuery and the Rails jQuery driver
<%= javascript_include_tag 'jquery-1.4.4.min', 'rails', 'jquery.form', 'jquery.remotipart' %>