Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'error-notification-message', closes #550
  • Loading branch information
carlosantoniodasilva committed Apr 28, 2012
2 parents 767dfae + e5541af commit 9fbac6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -9,7 +9,7 @@ en:
# When using html, text and mark won't be used.
# html: '<abbr title="required">*</abbr>'
error_notification:
default_message: "Some errors were found, please take a look:"
default_message: "Please review the problems below:"
# Labels and hints examples
# labels:
# defaults:
Expand Down
2 changes: 1 addition & 1 deletion lib/simple_form/error_notification.rb
Expand Up @@ -41,7 +41,7 @@ def translate_error_notification
lookups = []
lookups << :"#{object_name}"
lookups << :default_message
lookups << "Some errors were found, please take a look:"
lookups << "Please review the problems below:"
I18n.t(lookups.shift, :scope => :"simple_form.error_notification", :default => lookups)
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/form_builder/error_notification_test.rb
Expand Up @@ -23,7 +23,7 @@ def with_error_notification_for(object, options={}, &block)

test 'error notification is generated when the object has some error' do
with_error_notification_for @user
assert_select 'p.error_notification', 'Some errors were found, please take a look:'
assert_select 'p.error_notification', 'Please review the problems below:'
end

test 'error notification uses I18n based on model to generate the notification message' do
Expand Down

0 comments on commit 9fbac6c

Please sign in to comment.