mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 18:21:04 +08:00
992d3bffa3
Co-authored-by: Anton <anton@scinote.net>
9 lines
241 B
Ruby
9 lines
241 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.order(id: :asc).pluck(:name, :id)
|
|
end
|
|
end
|
|
end
|