Change error notification message default lookup when locale not found
This commit is contained in:
parent
b3e20395bc
commit
e5541af50d
|
@ -41,7 +41,7 @@ module SimpleForm
|
||||||
lookups = []
|
lookups = []
|
||||||
lookups << :"#{object_name}"
|
lookups << :"#{object_name}"
|
||||||
lookups << :default_message
|
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)
|
I18n.t(lookups.shift, :scope => :"simple_form.error_notification", :default => lookups)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ErrorNotificationTest < ActionView::TestCase
|
||||||
|
|
||||||
test 'error notification is generated when the object has some error' do
|
test 'error notification is generated when the object has some error' do
|
||||||
with_error_notification_for @user
|
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
|
end
|
||||||
|
|
||||||
test 'error notification uses I18n based on model to generate the notification message' do
|
test 'error notification uses I18n based on model to generate the notification message' do
|
||||||
|
|
Loading…
Reference in New Issue