-
-
Notifications
You must be signed in to change notification settings - Fork 974
Open
Description
πΌοΈ Context
When working with ButtonComponent on a recent change, I found myself needing to reach into the internals of the component to understand how to use the component as a button_to replacement/wrapper. As I dug in, I found that we are supplying method: :get to button_to as the default π
| button_to(*args, class: css, method: :get, **options, &block) |
button_to relies on using POST as the default, which is what I think we want here.
π€ What I Think Should Happen
- When using
ButtonComponent, the default result should be equivalent to Rails'sbutton_to(with styles applied) - When using
ButtonComponent, thebutton_toequivalent should default tomethod: :post, with the option to override the method - When supplying
type: :link, the result should be equivalent to Rails'slink_to(with styles applied)
Metadata
Metadata
Assignees
Labels
No labels