https://github.com/d1ceward/cropper_rails
Integrate Cropper library into Rails asset pipeline
https://github.com/d1ceward/cropper_rails
assets cropperjs rails
Last synced: 8 months ago
JSON representation
Integrate Cropper library into Rails asset pipeline
- Host: GitHub
- URL: https://github.com/d1ceward/cropper_rails
- Owner: d1ceward
- License: mit
- Created: 2018-09-13T13:19:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-18T08:37:44.000Z (over 2 years ago)
- Last Synced: 2025-04-27T19:07:35.322Z (9 months ago)
- Topics: assets, cropperjs, rails
- Language: Ruby
- Homepage: https://rubygems.org/gems/cropper_rails
- Size: 91.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Cropper for Rails
[](https://badge.fury.io/rb/cropper_rails)
[](https://github.com/d1ceward/jquery-cropper-rails/graphs/commit-activity)
[Cropper.js](https://github.com/fengyuanchen/cropperjs) is simple javaScript image cropper.
[jQuery Cropper](https://github.com/fengyuanchen/jquery-cropper) is a jQuery plugin wrapper for Cropper.js.
The `cropper_rails` gem integrates the `Cropper.js` library and `jQuery Cropper` plugin with the Rails asset pipeline.
## Installation
### Install cropper_rails gem
Add `cropper_rails` to your Gemfile and run `bundle install`:
```ruby
gem 'cropper_rails'
```
### Include cropper_rails javascript assets
Add the following to your `app/assets/javascripts/application.js`:
```js
//= require cropper
//= require jquery-cropper
```
### Include cropper_rails stylesheet assets
Add to your `app/assets/stylesheets/application.css`:
```css
*= require cropper
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/d1ceward/cropper_rails. By contributing you agree to abide by the Code of Merit.
## Code of Conduct
Everyone interacting in the cropper_rails project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/d1ceward/cropper_rails/blob/master/CODE_OF_CONDUCT.md).