1 class BrowseController < ApplicationController
4 before_filter :authorize_web
5 before_filter :set_locale
6 before_filter { |c| c.check_database_readable(true) }
7 around_filter :web_timeout
11 @feature = Relation.find(params[:id])
13 rescue ActiveRecord::RecordNotFound
14 render :action => "not_found", :status => :not_found
19 @feature = Relation.find(params[:id])
21 rescue ActiveRecord::RecordNotFound
22 render :action => "not_found", :status => :not_found
27 @feature = Way.preload(:way_tags, :containing_relation_members, :changeset => :user, :nodes => [:node_tags, :ways => :way_tags]).find(params[:id])
29 rescue ActiveRecord::RecordNotFound
30 render :action => "not_found", :status => :not_found
35 @feature = Way.preload(:way_tags, :old_ways => { :changeset => :user }).find(params[:id])
37 rescue ActiveRecord::RecordNotFound
38 render :action => "not_found", :status => :not_found
43 @feature = Node.find(params[:id])
45 rescue ActiveRecord::RecordNotFound
46 render :action => "not_found", :status => :not_found
51 @feature = Node.find(params[:id])
53 rescue ActiveRecord::RecordNotFound
54 render :action => "not_found", :status => :not_found
59 @changeset = Changeset.find(params[:id])
60 @node_pages, @nodes = paginate(:old_nodes, :conditions => {:changeset_id => @changeset.id}, :per_page => 10, :parameter => 'node_page')
61 @way_pages, @ways = paginate(:old_ways, :conditions => {:changeset_id => @changeset.id}, :per_page => 20, :parameter => 'way_page')
62 @relation_pages, @relations = paginate(:old_relations, :conditions => {:changeset_id => @changeset.id}, :per_page => 20, :parameter => 'relation_page')
63 rescue ActiveRecord::RecordNotFound
64 render :action => "not_found", :status => :not_found
69 @note = Note.find(params[:id])
70 rescue ActiveRecord::RecordNotFound
71 render :action => "not_found", :status => :not_found