ish_models 0.0.33.78 → 0.0.33.79
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gallery.rb +1 -1
- data/lib/ish_models/user_profile.rb +1 -0
- data/lib/newsitem.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 240dd34678015456100c09c5296a6afb65a654e6
|
4
|
+
data.tar.gz: 3409c27983375de3d27b70534c9332b1fbb0d79a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9639c1197fde35496ce2f0a706209934c69967fa8ea787b52f80e72f499bad051e3df7d6badf830b904cc3258129857cfad5a2ecc868cc93d175077cc54eda9
|
7
|
+
data.tar.gz: ddad21b167b80134eacaaf086569a47e5d3596eb578ea8d7ec4945a6ceff9e62c0171a7ba338a64ca5d421d6c11a3fce0d2149bf2336de5a0ce218800cd0d2eb
|
data/lib/gallery.rb
CHANGED
@@ -13,7 +13,7 @@ class Gallery
|
|
13
13
|
field :y, :type => Float
|
14
14
|
|
15
15
|
def self.list conditions = { :is_trash => false }
|
16
|
-
out = self.where( conditions ).order_by( :created_at => :desc )
|
16
|
+
out = self.unscoped.where( conditions ).order_by( :created_at => :desc )
|
17
17
|
[['', nil]] + out.map { |item| [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ] }
|
18
18
|
end
|
19
19
|
|
@@ -45,6 +45,7 @@ class IshModels::UserProfile
|
|
45
45
|
has_many :reports, :inverse_of => :user_profile
|
46
46
|
has_many :stocks, :class_name => 'Ish::StockWatch'
|
47
47
|
has_many :videos, :inverse_of => :user_profile
|
48
|
+
has_many :newsitems, inverse_of: :user_profile
|
48
49
|
|
49
50
|
has_and_belongs_to_many :friends, :class_name => 'IshModels::UserProfile', :inverse_of => :friendeds
|
50
51
|
has_and_belongs_to_many :friendeds, :class_name => 'IshModels::UserProfile', :inverse_of => :friends
|
data/lib/newsitem.rb
CHANGED
@@ -6,6 +6,7 @@ class Newsitem
|
|
6
6
|
belongs_to :tag, :optional => true
|
7
7
|
belongs_to :city, :optional => true
|
8
8
|
belongs_to :report, :optional => true
|
9
|
+
belongs_to :user_profile, class_name: 'IshModels::UserProfile', optional: true
|
9
10
|
|
10
11
|
belongs_to :gallery, :optional => true
|
11
12
|
def gallery
|