New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add doc about I18n support for :placeholder option [ci skip] #37054
Add doc about I18n support for :placeholder option [ci skip] #37054
Conversation
@@ -165,7 +165,7 @@ def select_tag(name, option_tags = nil, options = {}) | |||
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input. | |||
# * <tt>:size</tt> - The number of visible characters that will fit in the input. | |||
# * <tt>:maxlength</tt> - The maximum number of characters that the browser will allow the user to enter. | |||
# * <tt>:placeholder</tt> - The text contained in the field by default which is removed when the field receives focus. | |||
# * <tt>:placeholder</tt> - The text contained in the field by default which is removed when the field receives focus. If set to true, use a translation is found in the current I18n locale (through helpers.placeholders.<modelname>.<attribute>). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix this to wrap at 80 characters? Don't update the rest of the file, just the new docs you added. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review. I added a line break and did fource-push.
The :placeholder option accepts true, so it should be mentioned in the documentation. Ref: rails#16438
b7d6a84
to
7b157f1
Compare
…option Add doc about I18n support for :placeholder option [ci skip]
…option Add doc about I18n support for :placeholder option [ci skip]
Backported to 6-0-stable and 5-2-stable |
@@ -166,6 +166,8 @@ def select_tag(name, option_tags = nil, options = {}) | |||
# * <tt>:size</tt> - The number of visible characters that will fit in the input. | |||
# * <tt>:maxlength</tt> - The maximum number of characters that the browser will allow the user to enter. | |||
# * <tt>:placeholder</tt> - The text contained in the field by default which is removed when the field receives focus. | |||
# If set to true, use a translation is found in the current I18n locale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a translation is found in
->
use the translation found in
…lder_option Add doc about I18n support for :placeholder option [ci skip]
The :placeholder option accepts true, so it should be mentioned in the documentation.
Ref: #16438