Using ActiveResource and when I have a nested resource, using the 'prefix' works great.
class Account < ActiveResource::Base
self.prefix = "/users/:user_id/"
end
All is fine as long as :user_id has been defined, or else an error will be raised. But how to make the 'self.prefix' conditional, in cases where I don't want to access this resource as a nested resource, but rather as the resource itself? For example, I'd like to retrieve all accounts, not just the accounts scoped by a particular user?