I'm looking for a restful way of passing through options to a service. Right now I have a devices resource accessed in standard rails manner with:
map.resources :devices, :member => [:historical]
So I can get my device with /devices/:id
and I can get historical data with /devices/:id/historical
I'd like to actually add a param onto the historical URL that specifies a range, so when I query for historical data, i can get it back by hourly, daily, weekly, monthly. Something like /devices/:id/historical/:range
Is there a way to modify my route setting above to accommodate this? Or do I just have to pass it in like /devices/:id/historical?range=hourly
I'd prefer the former, but I'm not sure if that's breaking Restful conventions or what the best way to go about this is.