We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Add an option to render a form in rails so we can create a delete button in CRUD apps e.g
<%= render(Primer::Beta::Button.new( scheme: :danger, size: :small, ml: 2, form_arguments: { method: :delete}, href: delete_endpoint_path(endpoint.id), tag: :a, )) do |button| %> <% button.with_leading_visual_icon(icon: :trash) %> Delete <% end %>
The text was updated successfully, but these errors were encountered:
Hey @AchoArnold, thanks for bringing this up 😄 Using Button to submit a DELETE request should already be possible via Rails' form_with:
Button
form_with
<%= form_with(url: "/foo", method: :delete) do %> <%= render(Primer::Beta::Button.new(scheme: :danger, type: :submit)) do |button| %> <% button.with_leading_visual_icon(icon: :trash) %> Delete <% end %> <% end %>
Sorry, something went wrong.
No branches or pull requests
Add an option to render a form in rails so we can create a delete button in CRUD apps e.g
The text was updated successfully, but these errors were encountered: