ish_models 0.0.33.74 → 0.0.33.75

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/newsitem.rb +5 -0
  3. data/lib/site.rb +5 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c05af4b3e0c6101d6479bffb6ac2b5c298416c87
4
- data.tar.gz: a07f78f4f31aabd39b0ae14f7a8fd88458b6baec
3
+ metadata.gz: 8d6a34177992d8327e400da5ecd0b1761060f3ac
4
+ data.tar.gz: 6c3bd3d89889af78955cdc3787d2ea211a45ab39
5
5
  SHA512:
6
- metadata.gz: f68cedc333ba23cdf22060dbc3e0ddf1c594dd8c998d256d6a42fa423c77a09e6f14cbc9e5cef0a8e4597f0e9f48536f2232a23c4e03c62d0347bcc29acaa7a5
7
- data.tar.gz: 6536b1cfb13f774de3f21629b609e840016ae548e9d14c6d21ab9f098addff035fbddf06d7ab6085cb805a9ec5fcf4d2b8fc717036211e9e38c96540a91c8e5d
6
+ metadata.gz: 46fcdaf6bf4511d92f65d7dfffce1530840766ddf7af63c447f79965de07aeb6aad3b2ec097cb35c51333008acaafaee7bed166a5e4ca5e0166810fff5404899
7
+ data.tar.gz: 9ffbb1d290ec5315f53b87ebde19cad6f23be90c8bf945f1e0675d8d5d1ab24d5bdcadec7bd62a5243d417a77734f248268afe0c41d6868a7f4b8a2d0cf565fd
data/lib/newsitem.rb CHANGED
@@ -6,7 +6,12 @@ class Newsitem
6
6
  belongs_to :tag, :optional => true
7
7
  belongs_to :city, :optional => true
8
8
  belongs_to :report, :optional => true
9
+
9
10
  belongs_to :gallery, :optional => true
11
+ def gallery
12
+ Gallery.unscoped.find( self.gallery_id )
13
+ end
14
+
10
15
  belongs_to :video, :optional => true
11
16
 
12
17
  has_one :photo
data/lib/site.rb CHANGED
@@ -87,6 +87,11 @@ class Site
87
87
  def self.Tgm
88
88
  Site.find_by( :domain => 'travel-guide.mobi', :lang => :en )
89
89
  end
90
+ def self.sedux
91
+ site = Site.where( :domain => 'sedux.local' ).first
92
+ site ||= Site.where( :domain => 'sedux.net' ).first
93
+ site
94
+ end
90
95
 
91
96
  def name
92
97
  "#{domain}/#{lang}"
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.74
4
+ version: 0.0.33.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox