before_action :check_api_readable, :except => [:create, :update, :delete]
around_action :api_call_handle_error, :api_call_timeout
+ before_action :set_request_formats, :except => [:create, :update, :delete]
+
def create
assert_method :put
response.last_modified = @relation.timestamp
if @relation.visible
# Render the result
- render formats: [:xml]
+ respond_to do |format|
+ format.xml
+ format.json
+ end
else
head :gone
end
@relations << relation
# Render the result
- render formats: [:xml]
+ respond_to do |format|
+ format.xml
+ format.json
+ end
else
head :gone
end
@relations = Relation.find(ids)
# Render the result
- render formats: [:xml]
+ respond_to do |format|
+ format.xml
+ format.json
+ end
end
def relations_for_way
end
# Render the result
- render formats: [:xml]
+ respond_to do |format|
+ format.xml
+ format.json
+ end
end
end
end