end
def show
- way = Way.find(params[:id])
-
- response.last_modified = way.timestamp
+ @way = Way.find(params[:id])
- if way.visible
- @ways = [way]
+ response.last_modified = @way.timestamp
+ if @way.visible
# Render the result
- respond_to do |format|
- format.xml
- end
+ render :formats => [:xml]
else
head :gone
end
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 = {}
- # changeset_cache = {}
- # user_display_name_cache = {}
@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
- @ways = [way]
-
# Render the result
- respond_to do |format|
- format.xml
- end
+ render :formats => [:xml]
else
head :gone
end
@ways = Way.find(ids)
# Render the result
- respond_to do |format|
- format.xml
- end
+ render :formats => [:xml]
end
##
@ways = Way.where(:id => wayids, :visible => true)
# Render the result
- respond_to do |format|
- format.xml
- end
+ render :formats => [:xml]
end
end
end