diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-16 11:10:02 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-16 11:10:02 +0100 |
commit | 5d8ce5f4775ac8bc5f523964e6e36f63ff3c4683 (patch) | |
tree | 49ed889b1d10cda98c475f3453abff1b97afb4e7 /app/models/user.rb | |
parent | c9066760fd1f5f2f892ce2be5cf2a83bb5210246 (diff) | |
parent | 55784bcffc0678ce6102c0b81447434a8030ebd2 (diff) |
Merge branch 'develop'5.1-beta5
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 6 |
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 |