ish_models 0.0.33.159 → 0.0.33.160

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4818a5c5ecf9cc130dc740dbfb83814696043157259c9230003c797fcf655097
4
- data.tar.gz: 4ef6186e998a49f0700fe6e1b277943b2ada98d20d9b4cc93ad6dbc3bb668c92
3
+ metadata.gz: 9357739f510cad92b5496ec766b721e5dc1a621855ad3d43aa17d95715415b02
4
+ data.tar.gz: a1e7f1e1e0687d944313996bf0684977706f3340dbf85a76463616453a988521
5
5
  SHA512:
6
- metadata.gz: e99049e74cbf10218f4640fbe9fa47430a87433561ddce5aa6e3ada55a563d1aa7e0b5378bb1f3a1ba05fd63f13b892b956aaa920932378fab11467089697c3a
7
- data.tar.gz: c33bd4286fb568296e618c3882db078f0dc4f2239fcf2307368c4431640c15d74733cd66c6d93a5c1f4b5da9663aecb32a05a2dd1345af35ad3b19083f1d742c
6
+ metadata.gz: a23fdd757857717baa7e99b0ffb5d01d3a32dda773ba6655a3c525f65e31a10185e4918788804a2ddabbb926b633a1538f2e6fc20dba46d60bd16e427e467bc6
7
+ data.tar.gz: 794c26976f05052b423499feb31cdf2f801b5d0e55dd8aacdd51dd41d315f11cdd4c4ed92b14e0a79618214133e3a5c33fd9f3a8e8adc6a8f50f7d645caef1b0
data/lib/gallery.rb CHANGED
@@ -48,7 +48,7 @@ class Gallery
48
48
 
49
49
  has_and_belongs_to_many :tags
50
50
 
51
- has_many :newsitems
51
+ has_many :newsitems # seems correct. _vp_ 2022-03-21
52
52
  has_many :photos
53
53
 
54
54
  belongs_to :city, :optional => true
@@ -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
- ## @TODO: remove this alias
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: :user_profile ## @TODO: remove?!
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 :report, optional: true
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
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.159
4
+ version: 0.0.33.160
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox