Prefer keyword arguments when method has optional boolean arguments
This commit is contained in:
parent
63221710a4
commit
582402ba8f
17 changed files with 91 additions and 101 deletions
|
@ -21,7 +21,7 @@ module Api
|
|||
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
|
||||
|
|
|
@ -19,7 +19,7 @@ module Api
|
|||
def create
|
||||
assert_method :put
|
||||
|
||||
node = Node.from_xml(request.raw_post, true)
|
||||
node = Node.from_xml(request.raw_post, :create => true)
|
||||
|
||||
# Assume that Node.from_xml has thrown an exception if there is an error parsing the xml
|
||||
node.create_with_history current_user
|
||||
|
|
|
@ -16,7 +16,7 @@ module Api
|
|||
def create
|
||||
assert_method :put
|
||||
|
||||
relation = Relation.from_xml(request.raw_post, true)
|
||||
relation = Relation.from_xml(request.raw_post, :create => true)
|
||||
|
||||
# Assume that Relation.from_xml has thrown an exception if there is an error parsing the xml
|
||||
relation.create_with_history current_user
|
||||
|
|
|
@ -98,7 +98,7 @@ module Api
|
|||
end
|
||||
end
|
||||
|
||||
trkseg << point.to_xml_node(timestamps)
|
||||
trkseg << point.to_xml_node(:print_timestamp => timestamps)
|
||||
end
|
||||
|
||||
response.headers["Content-Disposition"] = "attachment; filename=\"tracks.gpx\""
|
||||
|
|
|
@ -16,7 +16,7 @@ module Api
|
|||
def create
|
||||
assert_method :put
|
||||
|
||||
way = Way.from_xml(request.raw_post, true)
|
||||
way = Way.from_xml(request.raw_post, :create => true)
|
||||
|
||||
# Assume that Way.from_xml has thrown an exception if there is an error parsing the xml
|
||||
way.create_with_history current_user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue