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:
@@ -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 = {})
|
||||
|
||||
Reference in New Issue
Block a user