ish_models 0.0.31 → 0.0.32
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 +22 -11
- data/lib/ish_models.rb +1 -3
- 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: 2969237ff16d6f14db37047fb60204f1d4c0ecc2
|
4
|
+
data.tar.gz: 8c4d6a25f815a676736d0e1c1d6572cec7640bd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f855acb9639155a8a0e1edd7eeece6f943449cefcabe496865754e93ce478ae4716b5fced45cdf0ed85ab73f5322c57d3b5822348d116a8946c8249b6030f0a
|
7
|
+
data.tar.gz: 5f8889ff575b4433f3d34e795253d191192110bb30277af1b0cb2a6bfe7fd8872da5d7231049dc649b29fd2f2249589ea0824cf9f6664d0927ba285279d68597
|
data/lib/gallery.rb
CHANGED
@@ -32,19 +32,30 @@ class Gallery < AppModel2
|
|
32
32
|
doc.username = doc.user.username
|
33
33
|
doc.galleryname = doc.name.to_simple_string
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
35
|
+
if doc.is_public
|
36
|
+
# for the sites
|
37
|
+
if doc.site
|
38
|
+
sites = Site.where( :domain => doc.site.domain )
|
39
|
+
sites.each do |site|
|
40
|
+
n = Newsitem.new {}
|
41
|
+
n.gallery = doc
|
42
|
+
n.username = doc.username
|
43
|
+
site.newsitems << n
|
44
|
+
flag = site.save
|
45
|
+
if !flag
|
46
|
+
puts! site.errors
|
47
|
+
end
|
46
48
|
end
|
47
49
|
end
|
50
|
+
|
51
|
+
# for the city
|
52
|
+
if doc.city
|
53
|
+
n = Newsitem.new {}
|
54
|
+
n.gallery = doc
|
55
|
+
n.city = doc.city
|
56
|
+
n.username = doc.username
|
57
|
+
n.save
|
58
|
+
end
|
48
59
|
end
|
49
60
|
end
|
50
61
|
|
data/lib/ish_models.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
|
2
2
|
require 'ish_models/railtie' if defined?(Rails)
|
3
|
-
|
3
|
+
require 'ish_models/configuration'
|
4
4
|
|
5
|
-
=begin
|
6
5
|
module IshModels
|
7
6
|
|
8
7
|
class << self
|
@@ -17,7 +16,6 @@ module IshModels
|
|
17
16
|
yield(configuration)
|
18
17
|
end
|
19
18
|
end
|
20
|
-
=end
|
21
19
|
|
22
20
|
require 'ish_models/cache_key.rb'
|
23
21
|
require 'ish_models/user.rb'
|