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
Implement field_id
in terms of the FormBuilder's namespace:
option
#43408
Implement field_id
in terms of the FormBuilder's namespace:
option
#43408
Conversation
140ee21
to
5d8a042
Compare
5d8a042
to
bac65e6
Compare
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.
Seems like it would be good to include this. 👍
@jonathanhefner I've since discovered that during the rails/actionview/lib/action_view/helpers/tags/base.rb Lines 95 to 105 in 3fcadfb
That rails/actionview/lib/action_view/helpers/tags/base.rb Lines 119 to 121 in 3fcadfb
This means that after these changes, user-land calls to |
I'm not as familiar with those internals, but it sounds like you are saying this change should be pushed down into |
@jonathanhefner maybe! I'll push on that a bit. |
9994078
to
a653f9f
Compare
faa0ba7
to
46453d2
Compare
1e044b6
to
02a761e
Compare
namespace:
optionnamespace:
option to FormBuilder#field_id
57cf085
to
739a75f
Compare
@rafaelfranca since |
namespace:
option to FormBuilder#field_id
FormBuilder#field_id
to bake-in support for namespace:
option
FormBuilder#field_id
to bake-in support for namespace:
optionfield_id
in terms of the FormBuilder's namespace:
option
739a75f
to
a73ca86
Compare
When constructing the field's `[id]` attribute, the current `FormBuilder#field_id` implementation (introduced in [59ca21c][]) ignores the `namespace:` option. This commit incorporates any namespace by prepending it to the `@object_name`. [59ca21c]: rails@59ca21c Re-use template.field_id --- Thread options[:namespace] down through the FormBuilder instance to the `Tags::Base#tag_id` and `#add_default_name_and_id` methods
a73ca86
to
0b8dde0
Compare
…eld-id-options Implement `field_id` in terms of the FormBuilder's `namespace:` option
When constructing the field's
[id]
attribute, the currentFormBuilder#field_id
implementation (introduced in 59ca21c) ignores thenamespace:
option.This commit incorporates any namespace by prepending it to the
@object_name
.