def read
node = Node.find(params[:id])
if node.visible?
- response.headers['Last-Modified'] = node.timestamp.rfc822
+ response.last_modified = node.timestamp
render :text => node.to_xml.to_s, :content_type => "text/xml"
else
render :text => "", :status => :gone
def version
if old_node = OldNode.where(:id => params[:id], :version => params[:version]).first
- response.headers['Last-Modified'] = old_node.timestamp.rfc822
+ response.last_modified = old_node.timestamp
doc = OSM::API.new.get_xml_doc
doc.root << old_node.to_xml_node
def version
if old_relation = OldRelation.where(:id => params[:id], :version => params[:version]).first
- response.headers['Last-Modified'] = old_relation.timestamp.rfc822
+ response.last_modified = old_relation.timestamp
doc = OSM::API.new.get_xml_doc
doc.root << old_relation.to_xml_node
def version
if old_way = OldWay.where(:id => params[:id], :version => params[:version]).first
- response.headers['Last-Modified'] = old_way.timestamp.rfc822
+ response.last_modified = old_way.timestamp
doc = OSM::API.new.get_xml_doc
doc.root << old_way.to_xml_node
def read
relation = Relation.find(params[:id])
- response.headers['Last-Modified'] = relation.timestamp.rfc822
+ response.last_modified = relation.timestamp
if relation.visible
render :text => relation.to_xml.to_s, :content_type => "text/xml"
else
def read
way = Way.find(params[:id])
- response.headers['Last-Modified'] = way.timestamp.rfc822
+ response.last_modified = way.timestamp
if way.visible
render :text => way.to_xml.to_s, :content_type => "text/xml"