ish_models 0.0.33.91 → 0.0.33.92
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/video.rb +13 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cc51a9eb5416b7dbce8df4c621bf9703270c885bab0a757074fa6be7bc05a78
|
4
|
+
data.tar.gz: ece2a4f07db920756f3907111810b45da14e6b282f2ba77b97ab64817d33bd0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f86cc68f8d5d2667b1d737ddfc047c6b4494ac8889dc48cd4635347c0acd810e7c4cc834ddd88c0e040a18c53a7ff331a8aa2c4851ce4ad6a1aa4963e909cbe1
|
7
|
+
data.tar.gz: a4044d1ed5090628d0bfffd7ff36ac9534d590c022f82c6112b61eda4bd6511381cef6dbd45038b9a1a5e76d196ca0f029340861bc83ab954e3981ce26630662
|
data/lib/video.rb
CHANGED
@@ -57,7 +57,19 @@ class Video
|
|
57
57
|
:s3_protocol => 'https',
|
58
58
|
:s3_permissions => 'public-read',
|
59
59
|
:validate_media_type => false
|
60
|
-
|
61
60
|
validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
|
62
61
|
|
62
|
+
has_mongoid_attached_file :thumb,
|
63
|
+
:styles => {
|
64
|
+
:mini => '20x20#',
|
65
|
+
:thumb => "100x100#",
|
66
|
+
:small => "400x400>",
|
67
|
+
},
|
68
|
+
:storage => :s3,
|
69
|
+
:s3_credentials => ::S3_CREDENTIALS,
|
70
|
+
:path => "videos/:style/:id/thumb_:filename",
|
71
|
+
:s3_protocol => 'https',
|
72
|
+
:validate_media_type => false
|
73
|
+
validates_attachment_content_type :thumb, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", 'application/octet-stream' ]
|
74
|
+
|
63
75
|
end
|