Permalink
Browse files

FeaturesController#update_all: pass model errors to translation

  • Loading branch information...
James A. Rosen
James A. Rosen committed Mar 4, 2013
1 parent 4da9887 commit 146a3ca289f3806a81d2bfe3782746cc03214f92
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/controllers/arturo/features_controller.rb
  2. +1 −1 config/locales/en.yml
@@ -40,7 +40,7 @@ def update_all
elsif feature.update_attributes(attributes)
updated_count += 1
else
- errors << t('arturo.features.flash.error_updating', :id => id)
+ errors << t('arturo.features.flash.error_updating', :id => id, :errors => feature.errors.full_messages.to_sentence)
end
end
if errors.any?
View
@@ -35,6 +35,6 @@ en:
created: "Created %{name}"
error_creating: "Sorry, there was an error creating the feature."
updated: "Updated %{name}"
- error_updating: "Sorry, there was an error updating %{name}"
+ error_updating: "Could not update feature #%{id}: %{errors}."
removed: "Removed %{name}"
error_removing: "Sorry, there was an error removing %{name}"

0 comments on commit 146a3ca

Please sign in to comment.