mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 03:36:44 +08:00
9 lines
229 B
Ruby
9 lines
229 B
Ruby
# frozen_string_literal: true
|
|
|
|
module UserRolesHelper
|
|
def user_roles_collection
|
|
Rails.cache.fetch([current_user, 'available_user_roles']) do
|
|
@user_roles_collection ||= UserRole.all.pluck(:name, :id)
|
|
end
|
|
end
|
|
end
|