Do I have to care about other methods than GET and POST?

If you really need to check for specific http verbs, the else is a must. Browsers are not smart enough to send anything than GET/POST, but other HTTP clients are, e.g.: wget, curl, just to name a few. curl can also send invalid http verbs.

Rails provide a much better way of doing http verb checks, the verify method [1]. It also allow you to check for http/session parameters and xhr.

If verify method not suit your needs, i will try to use a more idiomatic code like this.

request_is(request) do |verb|   verb.post { do_something1 }   verb.get { do_something2 }   verb.head { do_somethind3 }   ... end

The main idea is to encapsulate common behaviour for all actions in a request proxy. I mean, logging, mail to administrators, or whathever else you need to do, and pass the other method calls to the real request instance through Object#send

references: [1] http://api.rubyonrails.com/classes/ActionController/Verification/ClassMethods.html