ish_models 0.0.33.159 → 0.0.33.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gallery.rb +1 -1
- data/lib/ish/user_profile.rb +2 -5
- data/lib/newsitem.rb +7 -10
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9357739f510cad92b5496ec766b721e5dc1a621855ad3d43aa17d95715415b02
|
|
4
|
+
data.tar.gz: a1e7f1e1e0687d944313996bf0684977706f3340dbf85a76463616453a988521
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a23fdd757857717baa7e99b0ffb5d01d3a32dda773ba6655a3c525f65e31a10185e4918788804a2ddabbb926b633a1538f2e6fc20dba46d60bd16e427e467bc6
|
|
7
|
+
data.tar.gz: 794c26976f05052b423499feb31cdf2f801b5d0e55dd8aacdd51dd41d315f11cdd4c4ed92b14e0a79618214133e3a5c33fd9f3a8e8adc6a8f50f7d645caef1b0
|
data/lib/gallery.rb
CHANGED
data/lib/ish/user_profile.rb
CHANGED
|
@@ -13,10 +13,7 @@ class Ish::UserProfile
|
|
|
13
13
|
validates_format_of :email,:with => /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/
|
|
14
14
|
validates_uniqueness_of :email
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
def name
|
|
18
|
-
email
|
|
19
|
-
end
|
|
16
|
+
field :name
|
|
20
17
|
|
|
21
18
|
def export_fields
|
|
22
19
|
%w|
|
|
@@ -59,7 +56,7 @@ class Ish::UserProfile
|
|
|
59
56
|
# has_many :option_watches, class_name: 'IronWarbler::OptionWatch'
|
|
60
57
|
|
|
61
58
|
has_many :videos, inverse_of: :user_profile
|
|
62
|
-
has_many :newsitems, inverse_of: :
|
|
59
|
+
has_many :newsitems, inverse_of: :profile # @TODO: remove? denorm handle over here?
|
|
63
60
|
|
|
64
61
|
has_and_belongs_to_many :bookmarked_locations, class_name: '::Gameui::Map', inverse_of: :bookmarked_profile
|
|
65
62
|
def bookmarks
|
data/lib/newsitem.rb
CHANGED
|
@@ -6,22 +6,19 @@ class Newsitem
|
|
|
6
6
|
include Mongoid::Timestamps
|
|
7
7
|
include Ish::Utils
|
|
8
8
|
|
|
9
|
-
belongs_to :site, optional: true
|
|
10
|
-
belongs_to :tag, optional: true
|
|
11
9
|
belongs_to :city, optional: true
|
|
12
|
-
belongs_to :
|
|
13
|
-
belongs_to :user_profile, class_name: 'Ish::UserProfile', optional: true
|
|
14
|
-
belongs_to :map, class_name: '::Gameui::Map', optional: true
|
|
15
|
-
|
|
16
|
-
belongs_to :gallery, optional: true
|
|
10
|
+
belongs_to :gallery, optional: true # seems correct. _vp_ 2022-03-21
|
|
17
11
|
def gallery
|
|
18
12
|
self.gallery_id ? Gallery.unscoped.find( self.gallery_id ) : nil
|
|
19
13
|
end
|
|
20
|
-
|
|
14
|
+
belongs_to :map, optional: true, class_name: '::Gameui::Map'
|
|
15
|
+
belongs_to :profile, optional: true, class_name: 'Ish::UserProfile'
|
|
16
|
+
belongs_to :photo, optional: true
|
|
17
|
+
belongs_to :report, optional: true
|
|
18
|
+
belongs_to :site, optional: true
|
|
19
|
+
belongs_to :tag, optional: true
|
|
21
20
|
belongs_to :video, optional: true
|
|
22
21
|
|
|
23
|
-
has_one :photo
|
|
24
|
-
|
|
25
22
|
field :name
|
|
26
23
|
field :descr
|
|
27
24
|
def description
|