Skip to content
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

Support button_to on navigation item #427

Conversation

remy727
Copy link
Contributor

@remy727 remy727 commented Jul 8, 2024

WHY are these changes introduced?

Resolves #423

WHAT is this pull request doing?

Support button_to on navigation item

Usage

<%= polaris_navigation do |navigation| %>
  <% navigation.with_section do |section| %>
    <% section.with_item(
      url: destroy_user_session_path,
      label: "Logout",
      icon: "ExitIcon",
      action_type: :button,
      link_arguments: {
        method: :delete,
        data: {
          turbo: false
        }
      }
    ) %>
  <% end %>
<% end %>

@kirillplatonov
Copy link
Collaborator

Awesome! Thanks for contribution 👍

@kirillplatonov kirillplatonov merged commit 8a6eef5 into baoagency:main Jul 8, 2024
4 checks passed
@remy727 remy727 deleted the feature/support-button-to-on-navigation-item branch July 8, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does Navigation support method: :delete?
2 participants