Drew Wilson
2007-Nov-13 18:34 UTC
REST-based controller using HEAD to test for exist?/status?
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---