ish_models 0.0.33.59 → 0.0.33.60

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: bef50c4f8ef407bd36558e04017952197f006d62
4
- data.tar.gz: 944d11f7eb25042fdd72e055d8053a4d566703b2
3
+ metadata.gz: 8ab026ee82cfb953e027cac14561792a73a77af1
4
+ data.tar.gz: 00160f91bc7a972cc62ba1750ac689729c5ead6a
5
5
  SHA512:
6
- metadata.gz: b3a72b4efe76e65ecb6e9dd71c855a3f037a9b4a7e92cbd457b0c25df28923a338751f8f9e724a3ca48f877337e9da2c788cae3c4ea35d9d528c73d7aeabdefa
7
- data.tar.gz: 2313fd87be13bdd161d92203fdac4099406db61705a8b2dbd560c2a4f5a459955456b6818961cfc6ee9b4adc2d74df3cf447949d45ef9a5f6aeec38e1bf2f296
6
+ metadata.gz: d073777ea3d009e46a340845a40180a08cc57bbfdbf335b49ecfff4659700d8dc4521be2dc65ce0865af6aa5b7511786d61947454e846047266dac18e12607f7
7
+ data.tar.gz: 0a1e6af0221895b656ca943f28653b6f474339298635dbb422ae305d730170589b0c331b932d53372a3db210a5600d9360c25a673981b45245064d96155452b5
data/lib/city.rb CHANGED
@@ -31,6 +31,7 @@ class City
31
31
  has_many :reports
32
32
  has_many :venues
33
33
  has_many :videos
34
+ has_many :tags
34
35
  has_many :current_users, :class_name => '::IshModels::UserProfile', :inverse_of => :current_city
35
36
 
36
37
  has_one :profile_photo, :class_name => 'Photo', :inverse_of => :profile_city
data/lib/event.rb CHANGED
@@ -17,6 +17,12 @@ class Event
17
17
 
18
18
  belongs_to :city
19
19
  validates :city, :presence => true
20
-
20
+
21
+ field :x, :type => Float
22
+ field :y, :type => Float
23
+
24
+ has_one :profile_photo, :class_name => 'Photo', :inverse_of => :profile_event
25
+ has_many :photos
26
+
21
27
  end
22
28
 
@@ -2,9 +2,11 @@ class IshModels::UserProfile
2
2
  include Mongoid::Document
3
3
  include Mongoid::Timestamps
4
4
 
5
- field :name, :as => :username
5
+ field :name
6
6
  validates_presence_of :name
7
7
 
8
+ field :username
9
+
8
10
  field :email
9
11
  # validates_format_of :email, :with => ::Devise::email_regexp
10
12
  validates_format_of :email,:with => /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/
data/lib/photo.rb CHANGED
@@ -15,11 +15,13 @@ class Photo
15
15
  def user; user_profile; end
16
16
  belongs_to :profile_city, :class_name => 'City', :inverse_of => :profile_photo, :optional => true
17
17
  belongs_to :profile_venue, :class_name => 'Venue', :inverse_of => :profile_photo, :optional => true
18
+ belongs_to :profile_event, :class_name => 'Event', :inverse_of => :profile_photo, :optional => true
18
19
 
19
20
  belongs_to :report, :optional => true
20
21
  belongs_to :venue, :optional => true
22
+ belongs_to :event, :optional => true
21
23
  belongs_to :feature, :optional => true
22
- belongs_to :gallery, :optional => true # , :class_name => 'Gallery2'
24
+ belongs_to :gallery, :optional => true
23
25
  belongs_to :newsitem, :optional => true
24
26
 
25
27
  field :name, :type => String
data/lib/tag.rb CHANGED
@@ -3,7 +3,7 @@ class Tag
3
3
  include Mongoid::Timestamps
4
4
 
5
5
  field :name, :type => String
6
- validates :name, :uniqueness => true, :allow_nil => false
6
+ # validates :name, :uniqueness => true, :allow_nil => false
7
7
 
8
8
  field :name_seo, :as => :tagname
9
9
  validates :name_seo, :uniqueness => true, :allow_nil => false
@@ -28,6 +28,7 @@ class Tag
28
28
  has_many :newsitems
29
29
 
30
30
  belongs_to :site, :optional => true
31
+ belongs_to :city, :optional => true
31
32
 
32
33
  default_scope ->{
33
34
  where({ :is_public => true, :is_trash => false }).order_by({ :name => :asc })
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.59
4
+ version: 0.0.33.60
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox