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.
- checksums.yaml +4 -4
- data/lib/newsitem.rb +5 -0
- data/lib/site.rb +5 -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: 8d6a34177992d8327e400da5ecd0b1761060f3ac
|
4
|
+
data.tar.gz: 6c3bd3d89889af78955cdc3787d2ea211a45ab39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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}"
|