Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Change language of exceptions/permissions #614

Closed
passalini opened this issue May 4, 2012 · 2 comments
Closed

Change language of exceptions/permissions #614

passalini opened this issue May 4, 2012 · 2 comments

Comments

@passalini
Copy link

I need to change language of permissions/exceptions, I was wondering if there is a way to change as we change the language of a rails app.

@fillman
Copy link

fillman commented May 7, 2012

 # You can also use I18n to customize the message. Action aliases defined in Ability work here.
    #
    #   en:
    #     unauthorized:
    #       manage:
    #         all: "Not authorized to %{action} %{subject}."
    #         user: "Not allowed to manage other user accounts."
    #       update:
    #         project: "Not allowed to update this project."

Is that what you're lookin' for?
Source: https://github.com/ryanb/cancan/blob/master/lib/cancan/controller_additions.rb#L305

@passalini
Copy link
Author

exactly!!! Thanks and sorrry, I should have looked better documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants