def method_missing(method, *args)
      if verb = method.to_s.match(/\Ahttp_(get|post|put|delete|head)\z/)

        orig_uri, @uri = @uri, @uri.dup
        begin
          path, query = args[0].split('?', 2)
          @uri.path = "#{path}.#{@format.extension}#{'?' << query if query}" # Should be the form of /resources
          run_verb(verb.to_s.split('_').last, args[1])
        ensure
          @uri = orig_uri
        end
      end
    end
def method_missing(method, *args)
      if verb = method.to_s.match(/\Ahttp_(get|post|put|delete|head)\z/)

        orig_uri, @uri = @uri, @uri.dup
        begin
          path, query = args[0].split('?', 2)
          @uri.path = "#{path}.#{@format.extension}#{'?' << query if query}" # Should be the form of /resources
          run_verb(verb.to_s.split('_').last, args[1])
        ensure
          @uri = orig_uri
        end
      end
    end
this is used to run the http verbs like http_post, http_put, http_delete etc.
 TODO: handle nested resources, see prefix in ActiveResource