]> git.openstreetmap.org Git - rails.git/blob - app/controllers/ways_controller.rb
Merge remote-tracking branch 'upstream/pull/4747'
[rails.git] / app / controllers / ways_controller.rb
1 class WaysController < ApplicationController
2   layout :map_layout
3
4   before_action :authorize_web
5   before_action :set_locale
6   before_action -> { check_database_readable(:need_api => true) }
7   before_action :require_oauth
8
9   authorize_resource
10
11   around_action :web_timeout
12
13   def show
14     @type = "way"
15     @feature = Way.preload(:way_tags, :containing_relation_members, :changeset => [:changeset_tags, :user], :nodes => [:node_tags, { :ways => :way_tags }]).find(params[:id])
16     render "browse/feature"
17   rescue ActiveRecord::RecordNotFound
18     render "browse/not_found", :status => :not_found
19   end
20 end