I've the same two routes (see below) which can be activated by two different buttons, which call two different buttons.
My scenario is:
I've two buttons on the same page ("Release Version" and "Publish Version"). For each of these buttons I call a different remote method (exec_client and exec_release).
So, for questions of routes ambiguity (I think...) I couldn't call the second function I've defined on my routes.rb. Every time when I click on "Publish Version" button I call the exec_client method, whereas this button was supposed to call the exec_release method.
My question is: What can I do to fix it?
Below my routes code, where I think is the problem of code.
match 'projects/:id/repository', :action => 'exec_client', :controller => 'repositories', :via => :post
match 'projects/:id/repository/:branch', :action => 'exec_client', :controller => 'repositories', :via => :post
match 'projects/:id/repository', :action => 'exec_release', :controller => 'repositories', :via => :post
match 'projects/:id/repository/:branch', :action => 'exec_release', :controller => 'repositories', :via => :post
If you need another piece of my code, please ask and I'll put here.