Is there an avilable configuration parameter in ActiveResource to change the structure of the request URL
for example, when my client application tries to access the services of a specific user from an api send request, ActiveResource for api url in the following structure
http://localhost:3000/api/v1/services.json?user_id=1
but instead I want ActiveResource to send a request to api url like this
http://localhost:3000/api/v1/users/1/services
These are two model files that I use in my client rail application.
user.rb
class User < ActiveResource::Base self.site = "http://localhost:3001/api/v1" has_many :services end
service.rb
class Service < ActiveResource::Base self.site = "http://localhost:3001/api/v1" belongs_to :user end
Any help would be greatly appreciated. thanks
source share