adds edition/management of officials to admin zone

This commit is contained in:
Juanjo Bazán
2015-08-17 17:04:29 +02:00
parent 635dfba418
commit fabcb42328
12 changed files with 230 additions and 1 deletions

View File

@@ -41,4 +41,8 @@ class User < ActiveRecord::Base
def remove_official_position!
update official_position: nil, official_level: 0
end
def self.with_email(e)
e.present? ? where(email: e) : none
end
end