- @relation = Relation.find(params[:id])
- response.last_modified = @relation.timestamp
- if @relation.visible
- # Render the result
- respond_to do |format|
- format.xml
- format.json
- end
- else
- head :gone
- end
- end
-
- def create
- assert_method :put
-
- 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
- render :plain => relation.id.to_s
- end
-
- def update
- logger.debug request.raw_post
-