ubicloud/views/admin/object_action.erb
Jeremy Evans 8c6c73d4a0 Use link instead of button for Vm/PostgresResource restart button on admin site
The link takes you to a separate page with the button. This is done to
avoid accidental clicks.

As we plan to support additional actions in the future that will want to use
the same framework, I decided to DRY things up. You now register supported
actions per class in an OBJECT_ACTIONS hash. The object page display links to
each action-specific page with the button to perform the action. This approach
will allow for model-specific actions with potentially only a single line of
code.
2025-09-06 01:40:34 +09:00

3 lines
118 B
Text

<% @page_title = "#{@klass.name} #{@obj.ubid}" %>
<%== form({method: :post, id: "action-button"}, button: @label) %>