activeadmin_addons 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b07ada844c58bb9c3d4ea159936036ec72bb3c6
|
4
|
+
data.tar.gz: 43034c21385e90504f8ac1a7a36e44b4e5cf24f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff61a99492333012a68715dce2277752f44e27213df2cafee1ecd3aa2e1d446b16077119b684d101d5fc879e193fd48f4ac19a7848848981e782f81b15c57f0a
|
7
|
+
data.tar.gz: 38278fad95d29aad03517020c30fc72b7683314495ff0e36ab5d49f002f78109b23d372c88ecda5c2cfa411a0b7cc070a556f4369eed21b0d584c266fb25b418
|
@@ -21,9 +21,9 @@ module ActiveAdminAddons
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def render
|
24
|
-
options[:truncate] = options.fetch(:truncate, true)
|
25
|
-
return nil if data.nil?
|
26
24
|
raise 'you need to pass a paperclip attribute' unless data.respond_to?(:url)
|
25
|
+
options[:truncate] = options.fetch(:truncate, true)
|
26
|
+
return nil unless data.exists?
|
27
27
|
|
28
28
|
icon = icon_for_filename(data.original_filename)
|
29
29
|
icon_img = context.image_tag(icon, width: "20", height: "20", style: "margin-right: 5px; vertical-align: middle;")
|
@@ -34,7 +34,7 @@ module ActiveAdminAddons
|
|
34
34
|
context.safe_concat(label_text)
|
35
35
|
end
|
36
36
|
|
37
|
-
context.link_to(label, data.url, { target: "_blank" })
|
37
|
+
context.link_to(label, data.url, { target: "_blank" })
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|