some mods

This commit is contained in:
Harry Bomrah 2014-12-30 19:47:51 +08:00
parent 19754a8cec
commit 92eabd3be7
1 changed files with 4 additions and 3 deletions

View File

@ -14,8 +14,10 @@ class RegisteredSite
field :confirmation_token
has_many :site_logs
has_many :installed_modules
index({ confirmation_token: 1}, { unique: true })
scope :active, ->{where(:access_granted => true,:site_confirmed => true)}
def site_token
self.uid
@ -29,5 +31,4 @@ class RegisteredSite
def active?
return self.access_granted && self.site_confirmed
end
end