We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there, is anyone knows how to set i18n translate for royce role?
The text was updated successfully, but these errors were encountered:
That's what I did for my app :
module MyApp module CoreExt module RoyceRolePatch def self.included(base) base.send(:prepend, InstanceMethods) base.class_eval do scope :order_by_name, -> { order(name: :asc) } end end module InstanceMethods def to_s super.capitalize end end end end end unless Royce::Role.included_modules.include?(MyApp::CoreExt::RoyceRolePatch) Royce::Role.send(:include, MyApp::CoreExt::RoyceRolePatch) end
It adds a scope order_by_name and override to_s method. You could change it to I18n.t("roles.#{name}")
order_by_name
to_s
I18n.t("roles.#{name}")
Sorry, something went wrong.
No branches or pull requests
Hi there, is anyone knows how to set i18n translate for royce role?
The text was updated successfully, but these errors were encountered: