The simplest possible modal for jQuery for the Rails 3.1+ asset pipeline based on https://github.com/kylefox/jquery-modal
In your Gemfile, add:
group :assets do
gem 'jquery-modal-rails', :git => 'git:https://github.com/dei79/jquery-modal-rails.git'
end
To require the jQuery modal modules, add the following to your application.js:
//= require jquery.modal.min
Also add the jQuery modal CSS to your application.css:
/*
*= require jquery.modal
*/
All images required by jQuery Modal are automatically served through the asset pipeline, so you are good to go! For example, this code will open a view as a modal dialog
<a href="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/users/new" rel="modal:open">New User</a>