This isn't possible without changing your paths a little bit. For example you have to include the business_id.
So if you have:
resources :businesses do
resources :branches
end
the edit path for example should look like this:
edit_business_branch_path(business_id: 123, id: 456)
What you can do is to add a scope in your routes:
scope ":business_id" do
resources :branches
end
Generated routes:
branches GET /:business_id/branches(.:format) branches#index
POST /:business_id/branches(.:format) branches#create
new_branch GET /:business_id/branches/new(.:format) branches#new
edit_branch GET /:business_id/branches/:id/edit(.:format) branches#edit
branch GET /:business_id/branches/:id(.:format) branches#show
PATCH /:business_id/branches/:id(.:format) branches#update
PUT /:business_id/branches/:id(.:format) branches#update
DELETE /:business_id/branches/:id(.:format) branches#destroy
Now the path is like you want, but you still have to include the business_id:
edit_branch_path(business_id: 123, id: 456)