X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..77e8a16a153752b919a9153c1c9ded9834d387f7:/app/controllers/way_controller.rb?ds=inline diff --git a/app/controllers/way_controller.rb b/app/controllers/way_controller.rb index 0c83b5b92..dd9b65fd8 100644 --- a/app/controllers/way_controller.rb +++ b/app/controllers/way_controller.rb @@ -1,14 +1,13 @@ class WayController < ApplicationController - require 'xml/libxml' + require "xml/libxml" - skip_before_filter :verify_authenticity_token - before_filter :authorize, :only => [:create, :update, :delete] - before_filter :require_allow_write_api, :only => [:create, :update, :delete] - before_filter :require_public_data, :only => [:create, :update, :delete] - before_filter :check_api_writable, :only => [:create, :update, :delete] - before_filter :check_api_readable, :except => [:create, :update, :delete] - after_filter :compress_output - around_filter :api_call_handle_error, :api_call_timeout + skip_before_action :verify_authenticity_token + before_action :authorize, :only => [:create, :update, :delete] + before_action :require_allow_write_api, :only => [:create, :update, :delete] + before_action :require_public_data, :only => [:create, :update, :delete] + before_action :check_api_writable, :only => [:create, :update, :delete] + before_action :check_api_readable, :except => [:create, :update, :delete] + around_action :api_call_handle_error, :api_call_timeout def create assert_method :put @@ -84,11 +83,11 @@ class WayController < ApplicationController end def ways - unless params['ways'] + unless params["ways"] fail OSM::APIBadUserInput.new("The parameter ways is required, and must be of the form ways=id[,id[,id...]]") end - ids = params['ways'].split(',').collect(&:to_i) + ids = params["ways"].split(",").collect(&:to_i) if ids.length == 0 fail OSM::APIBadUserInput.new("No ways were given to search for")