ish_models 0.0.33.117 → 0.0.33.118
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 +2 -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: 121558953571ec7ddccd7fa69e5fc6ac7ae66fb854bf3c3af7a6e863c081d7ef
|
4
|
+
data.tar.gz: cd512a1f08541937604d4271331f37f08b0612a294ee87b58bc340bc0a8826de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d45ea857448f205f82ee8f3a26b8c758781595ad919ae7befd4bd142744d0806ae0d463abfe5fb591c9cf893bb589d5e3ae3979392eeb3962b3e635c5457b4e
|
7
|
+
data.tar.gz: ae1f643f25fe548a4dd733f888801373a5e9512e42f6f5e7766c2326114b48510d3658a6ad87e0779c53ac57616cb5ba2d53d4481f5e813e06daeeef4706991e
|
data/lib/video.rb
CHANGED
@@ -22,14 +22,14 @@ class Video
|
|
22
22
|
field :youtube_id, :type => String
|
23
23
|
# validates :youtube_id, :uniqueness => true, :presence => true
|
24
24
|
|
25
|
-
|
25
|
+
has_and_belongs_to_many :tags
|
26
26
|
belongs_to :city, :optional => true
|
27
27
|
belongs_to :site, :optional => true
|
28
28
|
has_many :newsitems
|
29
29
|
|
30
30
|
belongs_to :user_profile, :optional => true, :class_name => 'IshModels::UserProfile', :inverse_of => :videos
|
31
31
|
|
32
|
-
accepts_nested_attributes_for :site, :
|
32
|
+
accepts_nested_attributes_for :site, :tags, :city
|
33
33
|
|
34
34
|
def self.list
|
35
35
|
[['', nil]] + Video.unscoped.order_by( :created_at => :desc ).map { |item| [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ] }
|