Jcrop asset bundle for Rails >= 3.2.x (jcrop-rails gem looks abandoned)
- Rails 3.2.x/4.0.x support
- Clean and predictable update process (see scripts/update_jcrop.sh)
Add this line to your application's Gemfile:
gem 'jcrop-rails-v2', '~> x.x.x' # where x.x.x latest gem version
Add single line to 'application.css':
/*
*= require jquery.Jcrop
*/
Then add single line to 'application.js':
//= require jquery.Jcrop
That's all. Now you can use Jcrop inside your application.
If you want to use minified JS & CSS versions of Jcrop then just replace
jquery.Jcroptojquery.Jcrop.minin code snippets provided above.
If you want to use Jcrop in specified views only you can include its use the following commands:
<%= stylesheet_link_tag 'jquery.Jcrop' %>
<%= javascript_include_tag 'jquery.Jcrop' %>
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request