You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When provided a symbol argument, the label form helper produces an error.
Expected behavior
I'm not sure what the correct actual behavior is, so this may not be an issue at all. In all of the examples in the API docs, and in the unpublished guide, for form_for and its related helpers, all of the name/content method arguments are shown as strings. However, I noticed that some of the tests (notably the fields_for_collection tests) use symbol arguments.
If symbols are acceptable arguments, then label does not currently parse them correctly.
Summary
When provided a symbol argument, the
label
form helper produces an error.Expected behavior
I'm not sure what the correct actual behavior is, so this may not be an issue at all. In all of the examples in the API docs, and in the unpublished guide, for
form_for
and its related helpers, all of the name/content method arguments are shown as strings. However, I noticed that some of the tests (notably thefields_for_collection
tests) use symbol arguments.If symbols are acceptable arguments, then
label
does not currently parse them correctly.When the following erb template is used:
It should produce:
Actual behavior
Instead, an error is produced:
Discussion
If symbols should be accepted as the
content
argument to thelabel
form helper, the accompanying pull request includes a fix.The text was updated successfully, but these errors were encountered: