mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-04 05:42:15 +08:00
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.
3 lines
118 B
Text
3 lines
118 B
Text
<% @page_title = "#{@klass.name} #{@obj.ubid}" %>
|
|
|
|
<%== form({method: :post, id: "action-button"}, button: @label) %>
|