Allow using table actions in different namespaces

This way we can reuse it in sections like SDGManagement and URLs will be
automatically generated as expected.
This commit is contained in:
Javi Martín
2021-01-07 17:49:24 +01:00
parent 2968275a1c
commit c66a5a30ef
10 changed files with 63 additions and 14 deletions

View File

@@ -186,6 +186,16 @@ describe "Polymorphic routes" do
)
end
end
describe "sdg_management_polymorphic_path" do
include ActionDispatch::Routing::UrlFor
it "routes local targets" do
target = create(:sdg_local_target)
expect(sdg_management_polymorphic_path(target)).to eq sdg_management_local_target_path(target)
end
end
end
def polymorphic_path(record, options = {})