simple_form_extension 1.4.14 → 1.4.15
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82af1dba00fbb08a47aee5b4349f302fcbac1913
|
4
|
+
data.tar.gz: e81162516676385c045eee7112ce549d49e82452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb6b95c398462365a174815ceb82e344da1131401be8f0fd80b625a99ccc0409537c34ad17426cc1e5dcffdada246712645fd3a56b73ea80e12a6dac42998d5e
|
7
|
+
data.tar.gz: 97cd330f20ba85b9aa97dee5bcaaa27ca46f58b2486e8b8f0c4d812e4ed9e945f2063ec685b5c3921528e19d019ba8cd1417ff0dde5de074323d3dff349e116a
|
@@ -61,8 +61,12 @@ module SimpleFormExtension
|
|
61
61
|
def image_url
|
62
62
|
if object.try(:"#{ attribute_name }?")
|
63
63
|
object.send(attribute_name).url(image_style)
|
64
|
-
elsif object.try(attribute_name).try(:attached?)
|
65
|
-
|
64
|
+
elsif (image = object.try(attribute_name)).try(:attached?)
|
65
|
+
if image.variable?
|
66
|
+
image.variant(resize: "400x150>")
|
67
|
+
else
|
68
|
+
image
|
69
|
+
end
|
66
70
|
end
|
67
71
|
end
|
68
72
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glyph-fr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|