Using an around_handler for catching and rendering errors in most of the API controll...
authorMatt Amos <zerebubuth@gmail.com>
Wed, 20 May 2009 17:39:59 +0000 (17:39 +0000)
committerMatt Amos <zerebubuth@gmail.com>
Wed, 20 May 2009 17:39:59 +0000 (17:39 +0000)
commit3d0ca940d26bdc23aa791178b01b816185c5a086
treec0bd40e639a5d8e96a2af4443694a0780e6afb73
parent058d942c7ce9a25bd64c6673dbca15c718c7ef59
Using an around_handler for catching and rendering errors in most of the API controller methods. This simplifies the code and makes errors and error messages a bit more consistent. Also added a utility method for checking the HTTP method.
13 files changed:
app/controllers/application.rb
app/controllers/changeset_controller.rb
app/controllers/node_controller.rb
app/controllers/old_node_controller.rb
app/controllers/old_relation_controller.rb
app/controllers/old_way_controller.rb
app/controllers/relation_controller.rb
app/controllers/way_controller.rb
app/models/node.rb
app/models/relation.rb
app/models/way.rb
lib/osm.rb
test/functional/node_controller_test.rb