@ -105,7 +105,7 @@ class Principal < ApplicationRecord
end
def self.order_by_name
order(User::USER_FORMATS_STRUCTURE[Setting.user_format].map(&:to_s))
order(User::USER_FORMATS_STRUCTURE[Setting.user_format].map { |format| "#{Principal.table_name}.#{format}" })
def self.me