AjaxSubmitRails
Integrates jquery.form with the Rails asset pipeline. Supports AJAX form submission. Also submits form with file field with AJAX request.
Installation
Add this line to your application's Gemfile:
gem 'ajax_submit_rails'
And then execute:
$ bundle
Usage
Rails app with Asset Pipeline
If you're using the asset pipeline,
then you must add the following line to your app/assets/javascripts/application.js.
//= require jquery.form.min
Some people may need to add the extension to make it work
//= require jquery.form.min.js
You can also include unminified version (not recommended)
//= require jquery.form
Rails app without Asset Pipeline
Put this in your layout file.
For example:
application.html.erb
<%= javascript_include_tag 'jquery.form.min' %>
application.html.haml or application.html.slim
= javascript_include_tag 'jquery.form.min'
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ajax_submit_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.