Class: UcbRails::User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/ucb_rails/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.activeObject



12
13
14
# File 'app/models/ucb_rails/user.rb', line 12

def self.active
  where(inactive: false)
end

.adminObject



16
17
18
# File 'app/models/ucb_rails/user.rb', line 16

def self.admin
  where(admin: true)
end

Instance Method Details

#admin!Object



8
9
10
# File 'app/models/ucb_rails/user.rb', line 8

def admin!
  update_attribute(:admin, true)
end