ish_models 0.0.33.134 → 0.0.33.135
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/venue.rb +4 -2
- data/lib/video.rb +4 -2
- 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: 6c5a6043e8144f6fae57963f58a0880eb171044ae3bbc62d36ae013c0db3be04
|
4
|
+
data.tar.gz: e3414aeaba21e5273054e14d8bf037ec798418c1a97a894e5861d8811ef2d224
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2154545c111a45447bfa2bd1421e65afe4b68b17368fedf0de098e4cace9ea03cc9db25e3c0e7cd9f8b380a270fe7ce75b0544d8fa66d233ca4800e19046ee2
|
7
|
+
data.tar.gz: 99a571b6c35ed885e7b204dc922f5289451d0d4dc3d01ce1dd6f03a970dddf9b1c297d815353853c85c319c0ca60f0c22bff36ca37d3ef60a20476a926c6c16a
|
data/lib/venue.rb
CHANGED
@@ -2,15 +2,17 @@ class Venue
|
|
2
2
|
include ::Mongoid::Document
|
3
3
|
include ::Mongoid::Timestamps
|
4
4
|
|
5
|
+
field :address
|
6
|
+
|
5
7
|
field :name, :type => String
|
6
8
|
validates :name, :uniqueness => true, :allow_nil => false
|
7
9
|
|
8
10
|
field :name_seo, :type => String
|
9
11
|
validates :name_seo, :uniqueness => true, :allow_nil => false
|
10
|
-
|
12
|
+
|
11
13
|
field :subhead
|
12
14
|
field :descr
|
13
|
-
|
15
|
+
|
14
16
|
field :is_trash, :type => Boolean, :default => false
|
15
17
|
scope :fresh, ->{ where({ :is_trash => false }) }
|
16
18
|
scope :trash, ->{ where({ :is_trash => true }) }
|
data/lib/video.rb
CHANGED
@@ -53,7 +53,8 @@ class Video
|
|
53
53
|
:path => "videos/:style/:id/:filename",
|
54
54
|
:s3_protocol => 'https',
|
55
55
|
:s3_permissions => 'public-read',
|
56
|
-
:validate_media_type => false
|
56
|
+
:validate_media_type => false,
|
57
|
+
s3_region: ::S3_CREDENTIALS[:region]
|
57
58
|
validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
|
58
59
|
|
59
60
|
has_mongoid_attached_file :thumb,
|
@@ -70,7 +71,8 @@ class Video
|
|
70
71
|
:s3_credentials => ::S3_CREDENTIALS,
|
71
72
|
:path => "videos/:style/:id/thumb_:filename",
|
72
73
|
:s3_protocol => 'https',
|
73
|
-
:validate_media_type => false
|
74
|
+
:validate_media_type => false,
|
75
|
+
s3_region: ::S3_CREDENTIALS[:region]
|
74
76
|
validates_attachment_content_type :thumb, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", 'application/octet-stream' ]
|
75
77
|
|
76
78
|
set_callback :update, :after do |doc|
|