upload-image 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61404d65a5072010df2e308800528984f9f2fc2c
4
- data.tar.gz: 755cca4ae79dde0e3996db7882172637ab313f3a
3
+ metadata.gz: 22b54fe2251df7de8f7d1601136ff83f71909d78
4
+ data.tar.gz: 1e46ee36eb3df515edcd80979644a58f82cb439a
5
5
  SHA512:
6
- metadata.gz: 1b6101184af856780211535ef48d42f15496945775021ea7d2f7afc702f435574254d4279bdce46e4b56ecd7ebe88ab766dee815daaf94ea17fccf2ed08edcf1
7
- data.tar.gz: 8afe2d376e6f45aa655fd455436c237b5eabca8fcf42fbf016662545c4e049eedc98714fc31193338098031a5d298d4fec89c486dae5b2bba470e136442b385b
6
+ metadata.gz: 3fc7fca562cf1f4506a32a3bd8c98dc21c68818fbd7e0e483df0e9712c2828e04b58d134404687c8d6f7ea8e4114c219f8749a1e9be22a51b7b122f043c8643a
7
+ data.tar.gz: df620147c17b2951d8a4c6b1ffd39be95492b26bcbd1f23f9e6a29f987c4eae5156e5ff71c0ecf683475c54236deddf751f30a78cfd3c58d6a5e265995f4880f
data/README.md CHANGED
@@ -14,28 +14,28 @@ Then you will get:
14
14
  ## Usage
15
15
  There are some places you need to modify in your Rails app. For example:
16
16
 
17
- 1. Model file
17
+ - Model file
18
18
  ```ruby
19
19
  class User < ApplicationRecord
20
20
  mount_uploader :avatar, ImageUploader
21
21
  include Croppable
22
22
  end
23
23
  ```
24
- 2. CarrierWave uploader file
24
+ - CarrierWave uploader file
25
25
  ```ruby
26
26
  class ImageUploader < CarrierWave::Uploader::Base
27
27
  include Croppable
28
28
  ...
29
29
  end
30
30
  ```
31
- 3. Controller file
31
+ - Controller file
32
32
  ```ruby
33
33
  class UsersController < ApplicationController
34
34
  include Croppable
35
35
  ...
36
36
  end
37
37
  ```
38
- 4. View file
38
+ - View file
39
39
  ```ruby
40
40
  <%= upload_image form: f, image_name: :avatar, width: 150, height: 150 %>
41
41
  ```
@@ -54,6 +54,12 @@ And then execute:
54
54
  $ bundle
55
55
  ```
56
56
 
57
+ Add the require statement in your `config/application.rb`:
58
+
59
+ ```ruby
60
+ require 'upload_image'
61
+ ```
62
+
57
63
  ## Contributing
58
64
  Feel free to contribute.
59
65
 
@@ -1,6 +1,6 @@
1
1
  //= require ./cropper.min
2
2
 
3
- $(document).ready(function() {
3
+ $(document).on('turbolinks:load', function() {
4
4
  $('.b9bf30-upload-image').each(function() {
5
5
  // 'upload_elem' is the outer container.
6
6
  var upload_elem = $(this)
@@ -1,3 +1,3 @@
1
1
  module UploadImage
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upload-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Li Dong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-27 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails