Permalink
Browse files

add alert message to update and create actions

commented by default
  • Loading branch information...
1 parent e8212ae commit fc11d37bf52feb47c7a953f22fdd93a2c2992c43 @nashby nashby committed Sep 29, 2012
Showing with 5 additions and 2 deletions.
  1. +2 −1 README.md
  2. +3 −1 lib/responders/locales/en.yml
View
@@ -24,7 +24,8 @@ does not contain errors, it will automatically set the flash message to
```
In case the resource contains errors, you should use the failure key on I18n. This is
-useful to dry up flash messages from your controllers. If you need a specific message
+useful to dry up flash messages from your controllers. Note: by default alerts for `update`
+and `destroy` actions are commented in generated I18n file. If you need a specific message
for a controller, let's say, for `PostsController`, you can also do:
```yaml
@@ -3,8 +3,10 @@ en:
actions:
create:
notice: '%{resource_name} was successfully created.'
+ # alert: '%{resource_name} could not be created.'
update:
notice: '%{resource_name} was successfully updated.'
+ # alert: '%{resource_name} could not be updated.'
destroy:
notice: '%{resource_name} was successfully destroyed.'
- alert: '%{resource_name} could not be destroyed.'
+ alert: '%{resource_name} could not be destroyed.'

0 comments on commit fc11d37

Please sign in to comment.