end
def show
- way = Way.find(params[:id])
-
- response.last_modified = way.timestamp
+ @way = Way.find(params[:id])
- if way.visible
- @way = way
+ response.last_modified = @way.timestamp
+ if @way.visible
# Render the result
respond_to do |format|
format.xml
end
def full
- way = Way.includes(:nodes => :node_tags).find(params[:id])
+ @way = Way.includes(:nodes => :node_tags).find(params[:id])
- if way.visible
+ if @way.visible
visible_nodes = {}
@nodes = []
- way.nodes.uniq.each do |node|
+ @way.nodes.uniq.each do |node|
if node.visible
@nodes << node
visible_nodes[node.id] = node
end
end
- @way = way
-
# Render the result
respond_to do |format|
format.xml