Use placeholders instead of placeholder for I18n, following the conventions
This commit is contained in:
parent
6a7841d9e3
commit
e143376f8f
|
@ -29,7 +29,7 @@ module SimpleForm
|
|||
end
|
||||
|
||||
def placeholder
|
||||
@placeholder ||= options[:placeholder] || translate(:placeholder)
|
||||
@placeholder ||= options[:placeholder] || translate(:placeholders)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -231,7 +231,7 @@ class FormBuilderTest < ActionView::TestCase
|
|||
end
|
||||
|
||||
test 'placeholder should not be generated when set to false' do
|
||||
store_translations(:en, :simple_form => { :placeholder => { :user => {
|
||||
store_translations(:en, :simple_form => { :placeholders => { :user => {
|
||||
:name => 'Name goes here'
|
||||
} } }) do
|
||||
with_form_for @user, :name, :placeholder => false
|
||||
|
|
|
@ -59,7 +59,7 @@ class InputTest < ActionView::TestCase
|
|||
end
|
||||
|
||||
test 'input should use i18n to translate placeholder text' do
|
||||
store_translations(:en, :simple_form => { :placeholder => { :user => {
|
||||
store_translations(:en, :simple_form => { :placeholders => { :user => {
|
||||
:name => 'Name goes here'
|
||||
} } }) do
|
||||
with_input_for @user, :name, :string
|
||||
|
|
Loading…
Reference in New Issue