X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/75e135869e26a1aeae93f3334668de01c3bb2f69..42bb13b8178c341b8665255455a72239e3f2c213:/app/controllers/application_controller.rb?ds=sidebyside diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3f6abc470..8adea79a4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -216,7 +216,7 @@ class ApplicationController < ActionController::Base # asserts that the request method is the +method+ given as a parameter # or raises a suitable error. +method+ should be a symbol, e.g: :put or :get. def assert_method(method) - ok = request.send((method.to_s.downcase + "?").to_sym) + ok = request.send(:"#{method.to_s.downcase}?") raise OSM::APIBadMethodError, method unless ok end