<% # headmin/table/actions/action # # ==== Options # * +name - Name of the bulk action # * +url - URL to send the request to # * +method - HTTP method for the request (defaults to GET) # * +confirm - Message to show in a confirm dialog. Leave blank if no confirm dialog needs to be shown # # ==== Examples # Basic version. # <%= render 'headmin/table/actions/action', name: 'export', url: export_admin_products_path %#> # # Use a different HTTP method # <%= render 'headmin/table/actions/action', name: 'export', url: export_admin_products_path, method: :post %#> # # Show a confirm dialog before submitting. # <%= render 'headmin/table/actions/action', name: 'delete', url: destroy_admin_products_path, confirm: 'Are you sure you want to delete these products?' %#> url = local_assigns.has_key?(:url) ? local_assigns[:url] : request.path method = local_assigns.has_key?(:method) ? local_assigns[:method] : 'GET' confirm = local_assigns.has_key?(:confirm) ? local_assigns[:confirm] : nil turbo = confirm ? true : false %>