Home page schedule, publish and unpublish schedule, extended user data in housing

This commit is contained in:
Godwin
2016-07-17 20:04:15 -07:00
parent c474d0be1a
commit e9d9962d9a
15 changed files with 826 additions and 620 deletions
+2
View File
@@ -31,6 +31,8 @@ class Organization < ActiveRecord::Base
def host?(user)
return false unless user.present?
return true if user.administrator?
users.each do |u|
return true if u.id == user.id
end
+4
View File
@@ -36,6 +36,10 @@ class User < ActiveRecord::Base
return "#{name} <#{email}>"
end
def administrator?
role == 'administrator'
end
def self.get(email)
user = where(email: email).first