bhf 0.7.15 → 0.7.16
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: 29fb186c6102a0cb1b84f5513b67e5a669bcab2a
|
4
|
+
data.tar.gz: 8ce8a99cfd1a2397d981b5e8162ff9f2bc226e7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c20a468692b5edba95a704aef66b930b381611caf152efc7c0b1455537ba7a1171e8da04e4ec8e38862e67e5d34d2fd2d076854ac999b27c8cb7e11ae8157f7a
|
7
|
+
data.tar.gz: 7312dbc5e72879cd9fa38053e58854568901d3b50959fc3eccc9076b04e882280f214f60ec27010855cff8f824bb8173fd066bcb3fdcd7d1c0556bfcac68eee2
|
@@ -3,10 +3,10 @@
|
|
3
3
|
= node f, field do
|
4
4
|
- file = f.object.send(field.name)
|
5
5
|
- if file.file?
|
6
|
-
- if
|
6
|
+
- if type_is_image?(file.content_type)
|
7
7
|
= image_tag find_smallest_size_url_for_file(file), class: 'uploaded_image'
|
8
8
|
- else
|
9
|
-
= link_to
|
9
|
+
= link_to file.original_filename, file.url, class: 'uploaded_file'
|
10
10
|
|
11
11
|
- if f.object.respond_to?(:"#{field.name}_destroy")
|
12
12
|
.file_delete
|
@@ -1,5 +1,6 @@
|
|
1
1
|
- unless object.send(column.name).blank?
|
2
|
-
-
|
3
|
-
|
2
|
+
- file = object.send(column.name)
|
3
|
+
- if type_is_image?(file.content_type)
|
4
|
+
= image_tag find_smallest_size_url_for_file(file), alt: object.send(column.name), class: 'preview_image'
|
4
5
|
- else
|
5
|
-
=
|
6
|
+
= file.original_filename
|
data/lib/bhf.rb
CHANGED