I’d like to add an API to my REST-based controller that indicates the
existence of a resource (and maybe other status like the last time it
was updated.)
If I understand REST correctly, this seems like a natural use of
http’s HEAD method. I should be able to just add route for :conditions
=> {:method => :head} param, and implement a status or exist? method
to my controller.
Why isn’t this generated when I create my scaffold-resource?
How do others solve this problem? Do you just test for head? in your
show method?
I’m curious to know the best practice.
Thanks,
Drew