lib/avo/base_action.rb in avo-2.44.0 vs lib/avo/base_action.rb in avo-2.45.0
- old
+ new
@@ -30,22 +30,24 @@
delegate :context, to: ::Avo::App
def form_data_attributes
# We can't respond with a file download from Turbo se we disable it on the form
if may_download_file
- {turbo: turbo || false, remote: false, action_target: :form}
+ {turbo: turbo || false, remote: false}
else
- {turbo: turbo, turbo_frame: :_top, action_target: :form}.compact
+ {turbo: turbo, turbo_frame: :_top}.compact
end
end
# We can't respond with a file download from Turbo se we disable close the modal manually after a while (it's a hack, we know)
def submit_button_data_attributes
+ attributes = { action_target: "submit" }
+
if may_download_file
- {action: "click->modal#delayedClose"}
- else
- {}
+ attributes[:action] = "click->modal#delayedClose"
end
+
+ attributes
end
end
def action_name
return name if name.present?