Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #56 from nashby/alert

add alert message to update and create actions
  • Loading branch information...
commit a3d0640aea263c96606fe3ed61878b56829da8c1 2 parents e8212ae + fc11d37
José Valim josevalim authored

Showing 2 changed files with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 1  README.md
  2. +3 1 lib/responders/locales/en.yml
3  README.md
Source Rendered
@@ -24,7 +24,8 @@ does not contain errors, it will automatically set the flash message to
24 24 ```
25 25
26 26 In case the resource contains errors, you should use the failure key on I18n. This is
27   -useful to dry up flash messages from your controllers. If you need a specific message
  27 +useful to dry up flash messages from your controllers. Note: by default alerts for `update`
  28 +and `destroy` actions are commented in generated I18n file. If you need a specific message
28 29 for a controller, let's say, for `PostsController`, you can also do:
29 30
30 31 ```yaml
4 lib/responders/locales/en.yml
@@ -3,8 +3,10 @@ en:
3 3 actions:
4 4 create:
5 5 notice: '%{resource_name} was successfully created.'
  6 + # alert: '%{resource_name} could not be created.'
6 7 update:
7 8 notice: '%{resource_name} was successfully updated.'
  9 + # alert: '%{resource_name} could not be updated.'
8 10 destroy:
9 11 notice: '%{resource_name} was successfully destroyed.'
10   - alert: '%{resource_name} could not be destroyed.'
  12 + alert: '%{resource_name} could not be destroyed.'

0 comments on commit a3d0640

Please sign in to comment.
Something went wrong with that request. Please try again.