- def rest
- unless Node.exists?(params[:id])
- render :nothing => true, :status => 400
- return
+ # Dump the details on a node given in params[:id]
+ def read
+ begin
+ node = Node.find(params[:id])
+ if node.visible?
+ response.headers['Last-Modified'] = node.timestamp.rfc822
+ render :text => node.to_xml.to_s, :content_type => "text/xml"
+ else
+ render :text => "", :status => :gone
+ end
+ rescue ActiveRecord::RecordNotFound
+ render :nothing => true, :status => :not_found