-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Rename check_box in checkbox #52432
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
Rename check_box in checkbox #52432
Conversation
But add aliases for backward compatibility. Fix: rails#52430
# <%= f.submit %> | ||
# <% end %> | ||
# | ||
# Please refer to the documentation of the base helper for details. | ||
def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block) | ||
@template.collection_check_boxes(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_html_options.merge(html_options), &block) | ||
def collection_checkboxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block) |
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.
hi @byroot I think you forgot to add an alias here as well as in line 782
(sorry about the screenshot without context but i could reproduce it on our prod app )
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.
I opened #52436
@@ -779,7 +779,7 @@ def collection_radio_buttons(object, method, collection, value_method, text_meth | |||
# | |||
# In the rare case you don't want this hidden field, you can pass the | |||
# <tt>include_hidden: false</tt> option to the helper method. | |||
def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) | |||
def collection_checkboxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) |
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.
here as well
Follow-up to [rails#52432][] Related to [rails#52430][] Helpers like `text_area_tag` construct [textarea][] elements. This commit renames all view helper and form builder methods to replace occurrences of `text_area` with `textarea`. In the same style, this commit also renames the `rich_text`-prefixed helpers to utilize a `textarea` suffix instead of the existing `text_area` suffix. To preserve backwards compatibility, this commit defines aliases for the existing `text_area` format. [rails#52432]: rails#52432 [rails#52430]: rails#52430 [textarea]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
Follow-up to [rails#52432][] Related to [rails#52430][] Helpers like `text_area_tag` construct [textarea][] elements. This commit renames all view helper and form builder methods to replace occurrences of `text_area` with `textarea`. In the same style, this commit also renames the `rich_text`-prefixed helpers to utilize a `textarea` suffix instead of the existing `text_area` suffix. To preserve backwards compatibility, this commit defines aliases for the existing `text_area` format. [rails#52432]: rails#52432 [rails#52430]: rails#52430 [textarea]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
Follow-up to [rails#52432][] Related to [rails#52430][] Helpers like `text_area_tag` construct [textarea][] elements. This commit renames all view helper and form builder methods to replace occurrences of `text_area` with `textarea`. In the same style, this commit also renames the `rich_text`-prefixed helpers to utilize a `textarea` suffix instead of the existing `text_area` suffix. To preserve backwards compatibility, this commit defines aliases for the existing `text_area` format. [rails#52432]: rails#52432 [rails#52430]: rails#52430 [textarea]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
I've opened #52467 in the same spirit of this PR. It renames |
Follow-up to [rails#52432][] Related to [rails#52430][] Helpers like `text_area_tag` construct [textarea][] elements. This commit renames all view helper and form builder methods to replace occurrences of `text_area` with `textarea`. In the same style, this commit also renames the `rich_text`-prefixed helpers to utilize a `textarea` suffix instead of the existing `text_area` suffix. To preserve backwards compatibility, this commit defines aliases for the existing `text_area` format. [rails#52432]: rails#52432 [rails#52430]: rails#52430 [textarea]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
I guess it would make sense to deprecate Does Ruby on Rails have some kind of guideline or recommendation when to alias or when to deprecate a method? And how long to keep the old version? |
This isn't something worth deprecating, it's a simple alias. |
This is perhaps one of the most monumental changes to Rails in forever! 😆 Kudos. |
Follow-up to [rails#52432][] Related to [rails#52430][] Helpers like `text_area_tag` construct [textarea][] elements. This commit renames all view helper and form builder methods to replace occurrences of `text_area` with `textarea`. In the same style, this commit also renames the `rich_text`-prefixed helpers to utilize a `textarea` suffix instead of the existing `text_area` suffix. To preserve backwards compatibility, this commit defines aliases for the existing `text_area` format. [rails#52432]: rails#52432 [rails#52430]: rails#52430 [textarea]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
Follow-up to [rails#52432][] Related to [rails#52430][] Helpers like `text_area_tag` construct [textarea][] elements. This commit renames all view helper and form builder methods to replace occurrences of `text_area` with `textarea`. In the same style, this commit also renames the `rich_text`-prefixed helpers to utilize a `textarea` suffix instead of the existing `text_area` suffix. To preserve backwards compatibility, this commit defines aliases for the existing `text_area` format. [rails#52432]: rails#52432 [rails#52430]: rails#52430 [textarea]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
Follow-up to [rails#52432][] Related to [rails#52430][] Helpers like `text_area_tag` construct [textarea][] elements. This commit renames all view helper and form builder methods to replace occurrences of `text_area` with `textarea`. In the same style, this commit also renames the `rich_text`-prefixed helpers to utilize a `textarea` suffix instead of the existing `text_area` suffix. To preserve backwards compatibility, this commit defines aliases for the existing `text_area` format. [rails#52432]: rails#52432 [rails#52430]: rails#52430 [textarea]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
They got renamed in: * rails/rails#52432 * rails/rails#52467 This ensures the correct classes are generated for both old and new versions
This puts generators in an akward place where they need to handle both variants if they want to properly support both old and new rails versions. rails/tailwindcss-rails#418 Maybe it's fine? It looks like that whole thing is undocumented actually. I don't know enough about generators (zero to none actually) to be able to tell. |
They got renamed in: * rails/rails#52432 * rails/rails#52467 This ensures the correct classes are generated for both old and new versions (cherry picked from commit 68d819a)
They got renamed in: * rails/rails#52432 * rails/rails#52467 This ensures the correct classes are generated for both old and new versions (cherry picked from commit 68d819afc165f3b74226130cabec334a8ce8b9d3)
But add aliases for backward compatibility.
Fix: #52430