ish_models 0.0.33.245 → 0.0.33.247

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: de7c1387a79b26351435ba9dd4e0820282f36e15464884b650e7f4cf489fd1f4
4
- data.tar.gz: d36f19a818f22108ffb56d8f61f7e199816432b809d7c95d13466213342a9a4d
3
+ metadata.gz: 823be62d6f3e6bf6817ef43ebbcefda4c12049f01aedafb95b9fd01a624c6453
4
+ data.tar.gz: 9b1db16ef558002d83c109426fb41757a4b4892acc3f81a38dbaf130759b23dd
5
5
  SHA512:
6
- metadata.gz: ac941bc5a76b278489eb7d187154d8cbae27e04635a63b83c98c0d2e6c0b9c4adf01de26900e73f9ae50b38218aba00a70e29d9cb9dc434e4aafbf6dc4cae1a4
7
- data.tar.gz: 8693c6a86dfe3e30de6b42a2a4cc3b27616a6f90b3082f80c72d646acdd98d993ed17084052e3a358a98f8d1509b8cc90564869ca72af8a731bc97d4cba6e062
6
+ metadata.gz: 2238d1a7cd112636cc58aba0eaaea3534a9cd8bb504b901ebe0b3b2298bb8aba90cba6abd4b5063234063c8d0348290a94e7d8979308c204996929797e991cb3
7
+ data.tar.gz: b2788efc4ae0447ff65d56aa829164a44ae1e42fa12538a63bcd6802c957568da23763d254cc8b79033eb5d25f358b28c4abf2e485dfe1709f274cb721fdc106
@@ -41,18 +41,20 @@ class Ish::UserProfile
41
41
  ROLE_ADMIN = :admin
42
42
  field :role_name, :type => Symbol, default: :guy
43
43
 
44
- has_one :profile_photo, inverse_of: :profile_city, class_name: 'Photo'
44
+ has_one :profile_photo, inverse_of: :profile_city, class_name: 'Photo'
45
45
  has_many :galleries, inverse_of: :user_profile
46
46
  has_and_belongs_to_many :shared_galleries, inverse_of: :shared_profiles, class_name: 'Gallery'
47
47
  has_and_belongs_to_many :shared_markers, inverse_of: :shared_profiles, class_name: 'Gameui::Marker'
48
48
  has_and_belongs_to_many :shared_locations, inverse_of: :shared_profiles, class_name: 'Gameui::Map'
49
+ has_and_belongs_to_many :shared_reports, inverse_of: :shared_profiles, class_name: '::Report'
50
+ has_and_belongs_to_many :shared_videos, inverse_of: :shared_profiles, class_name: '::Video'
49
51
  has_many :my_markers, inverse_of: :creator_profile, class_name: 'Gameui::Marker'
50
52
  has_many :my_locations, inverse_of: :creator_profile, class_name: 'Gameui::Map'
51
53
  has_many :invoices, class_name: '::Ish::Invoice'
52
54
  has_many :photos
53
55
  has_many :reports, inverse_of: :user_profile
54
- has_many :videos, inverse_of: :user_profile
55
- has_many :newsitems, inverse_of: :profile
56
+ has_many :videos, inverse_of: :user_profile
57
+ has_many :newsitems, inverse_of: :profile
56
58
 
57
59
  def sudoer?
58
60
  %w( piousbox@gmail.com victor@wasya.co ).include?( self.email )
data/lib/ish_models.rb CHANGED
@@ -4,8 +4,6 @@ require 'ish/configuration'
4
4
  require 'aws-sdk-s3'
5
5
  require 'kaminari/mongoid'
6
6
 
7
- ::S3_CREDENTIALS ||= {}
8
-
9
7
  module Gameui; end
10
8
  module Iro; end
11
9
  module Ish; end
data/lib/report.rb CHANGED
@@ -35,6 +35,7 @@ class Report
35
35
  field :z, :type => Float
36
36
 
37
37
  belongs_to :user_profile, :optional => true, :class_name => 'Ish::UserProfile'
38
+ has_and_belongs_to_many :shared_profiles, :class_name => 'Ish::UserProfile', :inverse_of => :shared_reports
38
39
 
39
40
  has_one :photo
40
41
 
data/lib/video.rb CHANGED
@@ -38,7 +38,9 @@ class Video
38
38
  validates_uniqueness_of :youtube_id, allow_blank: true, case_sensitive: false
39
39
  before_save { youtube_id.present? || youtube_id = nil }
40
40
 
41
- belongs_to :user_profile, :optional => true, :class_name => 'Ish::UserProfile', :inverse_of => :videos
41
+ belongs_to :user_profile, :class_name => 'Ish::UserProfile', :inverse_of => :videos
42
+ has_and_belongs_to_many :shared_profiles, :class_name => 'Ish::UserProfile', :inverse_of => :shared_videos
43
+
42
44
 
43
45
  index({ is_trash: 1, user_profile_id: 1, created_at: 1 }, { name: 'idx1' })
44
46
 
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.245
4
+ version: 0.0.33.247
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox