I am new to ruby-on-rails and having a hard time trying to get routes to match for my API service.
I designed my custom routes for resources following the Google AIP-136.
For example, for the following routes
/books/{book_id}:doSomething
/books/{book_id}:doSomeOtherThing
In config/routes.rb, I expected the following to work –
post '/books/:id/:doSomething', to: 'books#do_something_handler'
post '/books/:id/:doSomeOtherThing', to: 'books#do_some_other_thing_handler'
But this does not work. I get a ActionController::RoutingError
saying that no routes match.
I tried some other things as well, but did not get a very satisfactory result.
Could someone help me out with how to do this properly.