Skip to content

Commit

Permalink
Change error notification message default lookup when locale not found
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Apr 28, 2012
1 parent b3e2039 commit e5541af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 e5541af

Please sign in to comment.