ruby-on-railsrubyruby-on-rails-4ruby-on-rails-5activeresource

ActiveResource: how to handle namespaced routes?


I have two applications. One application with routes like:

namespace :api do
  namespace :v1 do
    resources :things
  end
end

And another that I hope to connect to it via ActiveResource.

What's the right way to connect to the first application's api/v1/things route with ActiveResource?

Right now it looks a whole lot like I will have to implement custom_method_collection_url but that feels like a hack - is it the only way?


Solution

  • In the end, I implemented custom_method_collection_url. There was no better way that I could discern.