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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b15462d7144e5a5740a07b931f29839ca35315c
4
- data.tar.gz: aa6af4425bbe01c9bbf77da2163a56d88dba47bd
3
+ metadata.gz: 240dd34678015456100c09c5296a6afb65a654e6
4
+ data.tar.gz: 3409c27983375de3d27b70534c9332b1fbb0d79a
5
5
  SHA512:
6
- metadata.gz: cc449940ab0a1e993a3e8c3c7b736df43c323ac303836793b7c362bad768404d3a0accbb5f77e5614ec5ac1c22e1be0ab52404b8b2b42fe764efd5435321b8fb
7
- data.tar.gz: c175ae69618bfaad172a15fa0aeb7f5a3dff6f2d12a9fdae3bf555d50e6d92e37c425aebe4c44a05862024975b1381434375ddaadd88744db46be3163dfacfee
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.78
4
+ version: 0.0.33.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox