1 class BrowseController < ApplicationController
2 before_filter :authorize_web
6 @nodes = Node.find(:all, :order => "timestamp DESC", :limit=> 20)
11 @relation = Relation.find(params[:id])
13 @name = @relation.tags['name'].to_s
15 @name = "#" + @relation.id.to_s
18 @title = 'Relation | ' + (@name)
19 rescue ActiveRecord::RecordNotFound
20 render :nothing => true, :status => :not_found
26 @relation = Relation.find(params[:id])
28 @name = @relation.tags['name'].to_s
30 @name = "#" + @relation.id.to_s
33 @title = 'Relation History | ' + (@name)
34 rescue ActiveRecord::RecordNotFound
35 render :nothing => true, :status => :not_found
41 @way = Way.find(params[:id])
43 @name = @way.tags['name'].to_s
45 @name = "#" + @way.id.to_s
48 @title = 'Way | ' + (@name)
49 rescue ActiveRecord::RecordNotFound
50 render :nothing => true, :status => :not_found
56 @way = Way.find(params[:id])
58 @name = @way.tags['name'].to_s
60 @name = "#" + @way.id.to_s
63 @title = 'Way History | ' + (@name)
64 rescue ActiveRecord::RecordNotFound
65 render :nothing => true, :status => :not_found
71 @node = Node.find(params[:id])
73 @name = @node.tags_as_hash['name'].to_s
75 @name = "#" + @node.id.to_s
78 @title = 'Node | ' + (@name)
79 rescue ActiveRecord::RecordNotFound
80 render :nothing => true, :status => :not_found
86 @node = Node.find(params[:id])
88 @name = @node.tags_as_hash['name'].to_s
90 @name = "#" + @node.id.to_s
93 @title = 'Node History | ' + (@name)
94 rescue ActiveRecord::RecordNotFound
95 render :nothing => true, :status => :not_found