ish_models 0.0.33.41 → 0.0.33.42

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66d9b72c4a19c4d56bcd09c0bb1e1e95759db3e9
4
- data.tar.gz: '084186a75eefe7b3b0d145dab93856f103191bdf'
3
+ metadata.gz: b0b417a31b5acfd2de95be0118c9de895180de10
4
+ data.tar.gz: e9429ee6eb4669612fadcdfaf477797f8e01df8f
5
5
  SHA512:
6
- metadata.gz: 7eeb23060525941086561023d9fd0679f603f3f9778c36f20a1ee03d5b0e78764124735970725dabbb5e9a995395bd5f751398dc7dde0484eeb1bf245cba963b
7
- data.tar.gz: bb4db3e036f750cf436b06c2254b943cb5d8c4f699ba37aad65d0dfffa6a6e04feb4752e0ba60b4e7e43ca19ec07bd67f1bec611802b65ff282cdab338910ee8
6
+ metadata.gz: e6225dff732218e13d32338ca3ecba4dde66a1007b14ea1428c11e61c2b2f1f550244217ae65da1a859077e68b2b6faef02bcd1c62bc2e67e517267c47cbeb3e
7
+ data.tar.gz: 10999846cc29b58df253f374fefed95770720b9e2c5706e9f74e237f461a51fee5d515258a094ec5d69ef0cf959fc56745924349893f23c2c2a92e2631e3d931
@@ -33,12 +33,13 @@ class IshModels::UserProfile
33
33
  has_many :invoices, :class_name => 'Ish::Invoice'
34
34
  has_many :leads, :class_name => 'Ish::Lead'
35
35
  has_many :photos
36
- has_many :reports, :inverse_of => :profile
36
+ has_many :reports, :inverse_of => :user_profile
37
37
  has_many :stocks, :class_name => 'Ish::StockWatch'
38
- has_many :videos
38
+ has_many :videos, :inverse_of => :user_profile
39
39
 
40
40
  has_and_belongs_to_many :friends, :class_name => 'IshModels::UserProfile', :inverse_of => :friendeds
41
41
  has_and_belongs_to_many :friendeds, :class_name => 'IshModels::UserProfile', :inverse_of => :friends
42
+
42
43
  #
43
44
  # preferences
44
45
  #
data/lib/report.rb CHANGED
@@ -34,7 +34,7 @@ class Report
34
34
  field :lang, :type => String, :default => 'en'
35
35
  index({ :lang => 1 })
36
36
 
37
- belongs_to :profile, :optional => true, :class_name => 'IshModels::UserProfile'
37
+ belongs_to :user_profile, :optional => true, :class_name => 'IshModels::UserProfile'
38
38
 
39
39
  # validates :user, :presence => true, :allow_nil => false
40
40
  field :username, :type => String, :default => 'anonymous'
data/lib/video.rb CHANGED
@@ -24,13 +24,11 @@ class Video
24
24
 
25
25
  belongs_to :tag, :optional => true
26
26
  belongs_to :city, :optional => true
27
- belongs_to :site
28
- validates :site, :presence => true
29
- belongs_to :user
30
- validates :user, :presence => true
31
- belongs_to :user_profile, :optional => true
27
+ belongs_to :site, :optional => true
32
28
  has_many :newsitems
33
29
 
30
+ belongs_to :user_profile, :optional => true, :class_name => 'IshModels::UserProfile', :inverse_of => :videos
31
+
34
32
  accepts_nested_attributes_for :site, :tag, :city
35
33
 
36
34
  def self.list
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.41
4
+ version: 0.0.33.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox