forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow overriding
button_to_generates_button_tag
per-invocation
ref: rails#40747 The global config is great for new projects, but for large existing projects, auditing every `button_to` call could be overwhelming enough to not bother. This PR allows you to set if a button should always be returned per-invocation. This way you can gradually opt in to the config, or you can use it only in parts of your codebase. ```ruby button_to("Save", "http://www.example.com") # renders <input> button_to("Save", "http://www.example.com", button_tag: true) # renders <button> button_to("Save", "http://www.example.com", button_tag: false) # renders <input> button_to("Save", "http://www.example.com") # renders <button> button_to("Save", "http://www.example.com", button_tag: true) # renders <button> button_to("Save", "http://www.example.com", button_tag: false) # renders <input> ```
- Loading branch information
1 parent
31052d0
commit 1830cc8
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters