paper_cropper 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/paper_cropper/version.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb38a063d00da380ab37d233baac25f9823b7311
|
4
|
+
data.tar.gz: 03272e89f0479ac96037200e8232f1e014179e82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27d4ae20dee2532ab20ec09f55e11abf7b66f5b472eae48d6eb59a59ed5de62da1cd23a4d36a5e1b9c5e4a2c30be324c6eed97e50684541092b6484c7004e5a6
|
7
|
+
data.tar.gz: 4ae4577f753ab92c730333b995367560dab86fe4a0a116182637a2d168084f2ffc1dcd38b06b0c86418f23c254256a3fd0970ab6b7110b7985ccd149fbf808be
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ crop_attached_file :cover, aspect: false
|
|
30
30
|
Take care of permitted params. Add the following fields to ```permitted``` strong attributes:
|
31
31
|
|
32
32
|
```ruby
|
33
|
-
:cover_crop_x, :cover_crop_y, :cover_crop_width, :cover_crop_height
|
33
|
+
params.require(:model).permit(:cover, :cover_crop_x, :cover_crop_y, :cover_crop_width, :cover_crop_height)
|
34
34
|
```
|
35
35
|
|
36
36
|
## javascripts
|
@@ -52,14 +52,14 @@ $('.crop-image-container').each(function(){
|
|
52
52
|
@import "paper_cropper";
|
53
53
|
~~~
|
54
54
|
|
55
|
-
|
55
|
+
```paper_cropper``` is only required for this rule:
|
56
56
|
|
57
|
-
|
57
|
+
```css
|
58
58
|
/* Limit image width to avoid overflow the container */
|
59
59
|
.crop-image-container img.crop-image {
|
60
60
|
max-width: 100%; /* This rule is very important, please do not ignore this! */
|
61
61
|
}
|
62
|
-
|
62
|
+
```
|
63
63
|
|
64
64
|
---------------------------------------------
|
65
65
|
|
@@ -67,11 +67,11 @@ The paper_cropper is not required, is only for a small changes. The only thing r
|
|
67
67
|
|
68
68
|
helper, with twitter bootstrap classes, custom formatted, and other things
|
69
69
|
|
70
|
-
|
71
|
-
<%= form_for ..... %>
|
70
|
+
```ruby
|
71
|
+
<%= form_for ..... do |f| %>
|
72
72
|
<%= f.tws_cropper_box :cover %>
|
73
73
|
<% end %>
|
74
|
-
|
74
|
+
```
|
75
75
|
|
76
76
|
**custom (without helper)**
|
77
77
|
|
@@ -2,11 +2,16 @@ module PaperCropper
|
|
2
2
|
# Changelog based on Semantic Versioning: http://semver.org
|
3
3
|
# REMEMBER: Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
|
4
4
|
|
5
|
+
# 0.0.3 PATCH
|
6
|
+
# [FIX] Invalid method call when invoking attachment_changed?.
|
7
|
+
# [DOC] Improve README.
|
8
|
+
|
9
|
+
|
5
10
|
# 0.0.2 PATCH
|
6
|
-
|
11
|
+
# [FEATURE] Added ActiveRecord extensions to force attachment updated_at field to be setted
|
7
12
|
# on every attachment change.
|
8
13
|
|
9
14
|
unless defined?(PaperCropper::VERSION)
|
10
|
-
VERSION =
|
15
|
+
VERSION = '0.0.3'.freeze
|
11
16
|
end
|
12
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paper_cropper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Coditramuntana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|