projects
/
rails.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor account form to use bootstrap
[rails.git]
/
app
/
controllers
/
api
/
changesets_controller.rb
diff --git
a/app/controllers/api/changesets_controller.rb
b/app/controllers/api/changesets_controller.rb
index a5a37b485868f8e986053cd723b17e0b671f5710..29a57570d154383dbbbf3381be8ba6a86508ea54 100644
(file)
--- a/
app/controllers/api/changesets_controller.rb
+++ b/
app/controllers/api/changesets_controller.rb
@@
-21,7
+21,7
@@
module Api
def create
assert_method :put
def create
assert_method :put
- cs = Changeset.from_xml(request.raw_post, true)
+ cs = Changeset.from_xml(request.raw_post,
:create =>
true)
# Assume that Changeset.from_xml has thrown an exception if there is an error parsing the xml
cs.user = current_user
# Assume that Changeset.from_xml has thrown an exception if there is an error parsing the xml
cs.user = current_user
@@
-319,9
+319,7
@@
module Api
end
# stupid Time seems to throw both of these for bad parsing, so
# we have to catch both and ensure the correct code path is taken.
end
# stupid Time seems to throw both of these for bad parsing, so
# we have to catch both and ensure the correct code path is taken.
- rescue ArgumentError => e
- raise OSM::APIBadUserInput, e.message.to_s
- rescue RuntimeError => e
+ rescue ArgumentError, RuntimeError => e
raise OSM::APIBadUserInput, e.message.to_s
end
raise OSM::APIBadUserInput, e.message.to_s
end