10 lines
228 B
Ruby
10 lines
228 B
Ruby
|
|
module AccountManagementHelper
|
||
|
|
def roles_by_power
|
||
|
|
AccountAuth.roles.sort_by { |key, value| -value }.map(&:first)
|
||
|
|
end
|
||
|
|
|
||
|
|
def options_for_role_select
|
||
|
|
AccountAuth.roles.map { |role, _| [role.titleize, role] }
|
||
|
|
end
|
||
|
|
end
|