Class: Odania::User

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

Instance Method Summary collapse

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'app/models/odania/user.rb', line 10

def admin?
	role = self.roles.where(role: Odania::UserRole.roles[:admin]).first
	role.nil? ? false : true
end