administrate custom action on show page

1k Views Asked by At

I would like to add a reinvite user button on my users show page.

My reinvite button looks like this:

    def reinvite
        User.reinvite!
    end

And the button looks like this:

    <%= link_to(
  "Reinvite User",
  [namespace, page.resource],
  class: "button",
  ) if valid_action?(:reinvite) && show_action?(:reinvite, 
  page.resource) %>

But the button don't render on the show page.

0

There are 0 best solutions below