summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-02-12 15:53:49 +0100
committerspag <spag@golwen.net>2013-02-12 15:53:49 +0100
commit36d1a38594361dcd021c23ae9c5040a37d0918df (patch)
tree15ebad678743935103e441bc54609ef9c58801a4 /app/models/user.rb
parentfbdb5dca9b3979010b87b16fcb3bf9410c453e91 (diff)
make parking stall child of user/tenant
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index afb3f04..fdcd617 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -87,6 +87,8 @@ class User < ActiveRecord::Base
validate :current_tenant_is_included_in_tenants, :if => Proc.new{ |user| user.current_tenant_id }
belongs_to :gs_node
+
+ has_many :parking_stalls, :as => :parking_stallable, :dependent => :destroy
# Avatar like photo
mount_uploader :image, ImageUploader