ish_models 0.0.33.20 → 0.0.33.21

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
  SHA1:
3
- metadata.gz: 6b32908f187bf28f4a80d8ab62bb63cbb881cb4a
4
- data.tar.gz: 165a8e17d001a3d343d598a1be797ac9df09ccaf
3
+ metadata.gz: 4b67c62354e4af145a25fe1271036d30b2579985
4
+ data.tar.gz: 8cdfafa110c22361abb0de8f25f5028b7b7ec8be
5
5
  SHA512:
6
- metadata.gz: 5655c346570d3bfe0cfaaccff910cbadc924951be99f47bacda78dd84ee63baa3d1531843fc3951efbe3d5eb40d460472723a4efcdf2a0f8e927468d7f545e1c
7
- data.tar.gz: a1cc3ffe056615528c523b72ba650e784ccab20b4be48f8cf3e061bd1c2e30b80733dde1b1ae02c34cb436997c1febe087ec9578f74cfc856980a6e56317a26d
6
+ metadata.gz: 5d82d903c7c686c98167cdcc86dd825b4017d3783b2053ebff167414592366affbda084d437ad8d9427e2b5111d42a06fcca43aff068f35bb8d80ba1efb8851a
7
+ data.tar.gz: dc35be249c3f75b0d92422cd095872a5f2f1089e99440ccf8b90199e645fe56e0dd867f3fe212cb2bc93eaebc03f89555839a5141e1df485c1db84c228b4336c
data/lib/city.rb CHANGED
@@ -31,10 +31,10 @@ class City
31
31
  has_many :reports
32
32
  has_many :venues
33
33
  has_many :videos
34
- has_many :current_users, :class_name => '::IshModels::User', :inverse_of => :current_city
34
+ has_many :current_users, :class_name => '::IshModels::UserProfile', :inverse_of => :current_city
35
35
 
36
36
  has_one :profile_photo, :class_name => 'Photo', :inverse_of => :profile_city
37
- has_one :guide, :class_name => '::IshModels::User', :inverse_of => :guide_city
37
+ has_one :guide, :class_name => '::IshModels::UserProfile', :inverse_of => :guide_city
38
38
 
39
39
  has_many :newsitems
40
40
 
data/lib/feature.rb CHANGED
@@ -13,10 +13,10 @@ class Feature
13
13
  field :inner_html, :type => String
14
14
  field :weight, :type => Integer, :default => 10
15
15
 
16
- belongs_to :photo
17
- belongs_to :report
18
- belongs_to :gallery
19
- belongs_to :video
16
+ belongs_to :photo, :optional => true
17
+ belongs_to :report, :optional => true
18
+ belongs_to :gallery, :optional => true
19
+ belongs_to :video, :optional => true
20
20
  # has_one :photo
21
21
  # has_one :report
22
22
  # has_one :gallery
@@ -3,6 +3,10 @@ class IshModels::UserProfile
3
3
  include Mongoid::Timestamps
4
4
 
5
5
  field :username, :type => String
6
+ field :name
7
+ field :email
8
+
9
+ field :fb_access_token
6
10
 
7
11
  field :about, :type => String
8
12
  field :education, :type => String
@@ -16,9 +20,13 @@ class IshModels::UserProfile
16
20
  field :lang, :type => String
17
21
 
18
22
  belongs_to :user
19
-
23
+ belongs_to :current_city, :class_name => 'City', :inverse_of => :current_users, :optional => true
24
+ belongs_to :guide_city, :class_name => 'City', :inverse_of => :guide, :optional => true
25
+
20
26
  has_many :galleries
21
-
27
+ has_many :reports
28
+ has_many :videos
29
+
22
30
  def manager?
23
31
  %w( piousbox@gmail.com manager@gmail.com ).include?( self.user.email ) ? true : false
24
32
  end
data/lib/ish_models.rb CHANGED
@@ -18,7 +18,7 @@ module IshModels
18
18
  end
19
19
 
20
20
  require 'ish_models/cache_key.rb'
21
- require 'ish_models/user.rb'
21
+ # require 'ish_models/user.rb'
22
22
  require 'ish_models/user_profile.rb'
23
23
 
24
24
  require 'app_model2.rb'
@@ -36,6 +36,6 @@ require 'public_item.rb'
36
36
  require 'report.rb'
37
37
  require 'site.rb'
38
38
  require 'tag.rb'
39
- require 'user_profile.rb'
39
+ # require 'user_profile.rb'
40
40
  require 'venue.rb'
41
41
  require 'video.rb'
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.20
4
+ version: 0.0.33.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -70,7 +70,7 @@ files:
70
70
  - lib/ish_models/profile.rb~
71
71
  - lib/ish_models/railtie.rb
72
72
  - lib/ish_models/railtie.rb~
73
- - lib/ish_models/user.rb
73
+ - lib/ish_models/trash/user.rb
74
74
  - lib/ish_models/user.rb~
75
75
  - lib/ish_models/user_profile.rb
76
76
  - lib/manager.rb
@@ -80,7 +80,7 @@ files:
80
80
  - lib/report.rb
81
81
  - lib/site.rb
82
82
  - lib/tag.rb
83
- - lib/user_profile.rb
83
+ - lib/trash/user_profile.rb
84
84
  - lib/user_profile.rb~
85
85
  - lib/venue.rb
86
86
  - lib/video.rb
File without changes
File without changes