Skip to content
New issue

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

Add keys for success when creating/updating/destroying a model #784

Closed
gtarsia opened this issue Jun 6, 2018 · 3 comments
Closed

Add keys for success when creating/updating/destroying a model #784

gtarsia opened this issue Jun 6, 2018 · 3 comments

Comments

@gtarsia
Copy link

gtarsia commented Jun 6, 2018

When running the scaffold_controller generator, the following messages gets hardcoded:
%{model} was successfully created|updated|destroyed.

scaffold_controller code for created.

It'd be nice to have translations for that, but I'm not sure of two things:

  1. Wether this is a good feature?
  2. What would a good key be for this? I think helpers.success.created|updated|destroyed could be good ones.
@owl-bo
Copy link

owl-bo commented Jun 23, 2018

I think your idea is good. I often have rewritten that code.
But it maybe should be discussed on rails(scaffold) repository, not here.

And its key is preferable that it includes 'scaffold' in my opinion .
(ex. scaffold.success.created

@jpgeek
Copy link

jpgeek commented May 2, 2019

I too often wind up writing my own translation files to handle this message. My impression is that this would fit well in rails-i18n. Since there is already:
activerecord.errors.messages....
maybe just add something like:
activerecord.success.messages...
I think the actual message relates directly to ActiveRecord regardless of where it is displayed, so it fits better here than in the scaffold discussion.

@digitalfrost
Copy link
Collaborator

Closing - Please refer to #1008 to track this issue

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

No branches or pull requests

4 participants