diff --git a/app/controllers/avo/actions_controller.rb b/app/controllers/avo/actions_controller.rb index d01acf2ded..89e0efe394 100644 --- a/app/controllers/avo/actions_controller.rb +++ b/app/controllers/avo/actions_controller.rb @@ -4,7 +4,7 @@ module Avo class ActionsController < ApplicationController before_action :set_resource_name before_action :set_resource - before_action :set_record, only: [:show, :handle], if: ->(request) do + before_action :set_record, only: :show, if: ->(request) do # Try to se the record only if the user is on the record page. # set_record will fail if it's tried to be used from the Index page. request.params[:id].present? diff --git a/app/views/avo/actions/show.html.erb b/app/views/avo/actions/show.html.erb index ad4834aa5b..a91e12147b 100644 --- a/app/views/avo/actions/show.html.erb +++ b/app/views/avo/actions/show.html.erb @@ -11,7 +11,7 @@ class="hidden text-slate-800" > <%= form_with scope: 'fields', - url: @action.link_arguments(resource: @resource).first, + url: Avo::Services::URIService.parse(@resource.records_path).append_paths("actions").to_s, local: true, html: { novalidate: true, @@ -29,6 +29,7 @@