summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index afb3f04..6c67351 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
@@ -148,6 +150,10 @@ class User < ActiveRecord::Base
self.user_groups.include?(UserGroup.find(2))
end
+ def sim_cards
+ SimCard.where(:sip_account_id => self.sip_account_ids)
+ end
+
private
def hash_new_pin