ish_models 0.0.33.38 → 0.0.33.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish_models/user_profile.rb +3 -3
- data/lib/site.rb +3 -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: c31af04e831e6aec232d9b6944df0e42e1c8a58c
|
4
|
+
data.tar.gz: db54ca5c25c623aeca09ebea3dec1836d6a467e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e4b18d900171f892978a530b8494be4d76492700ca0b6d299e1e7f3980671ffea601099c218ea5bb13664be1982cae5e5143d3d2a1afb456066bbe51b47538b
|
7
|
+
data.tar.gz: db5e1fd54a4afca7300f795f5a50cfd9417077e28433246a4331f653ee76ef75d2bf2cb1205671da6704686990b3a79530677b67d96f31240dc232898e2db213
|
@@ -30,11 +30,11 @@ class IshModels::UserProfile
|
|
30
30
|
has_many :galleries, :inverse_of => :user_profile
|
31
31
|
has_and_belongs_to_many :shared_galleries, :class_name => 'Gallery', :inverse_of => :shared_profiles
|
32
32
|
|
33
|
-
has_many :invoices
|
34
|
-
has_many :leads
|
33
|
+
has_many :invoices, :class_name => 'Ish::Invoice'
|
34
|
+
has_many :leads, :class_name => 'Ish::Lead'
|
35
35
|
has_many :photos
|
36
36
|
has_many :reports, :inverse_of => :profile
|
37
|
-
has_many :stocks,
|
37
|
+
has_many :stocks, :class_name => 'Ish::StockWatch'
|
38
38
|
has_many :videos
|
39
39
|
|
40
40
|
has_and_belongs_to_many :friends, :class_name => 'IshModels::UserProfile', :inverse_of => :friendeds
|
data/lib/site.rb
CHANGED
@@ -44,16 +44,16 @@ class Site
|
|
44
44
|
|
45
45
|
set_callback :create, :before do |doc|
|
46
46
|
if Site.where( :lang => doc.lang, :domain => doc.domain ).length > 0
|
47
|
-
|
47
|
+
false
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
set_callback :update, :before do |doc|
|
52
52
|
possible_duplicate = Site.where( :lang => doc.lang, :domain => doc.domain ).first
|
53
53
|
if possible_duplicate.blank?
|
54
|
-
|
54
|
+
true
|
55
55
|
elsif doc.id != possible_duplicate.id
|
56
|
-
|
56
|
+
false
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|