X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e03605929bcd7fe864c0b0c38c4ec8c80f865c39..e414d10aa10815b07e0ab334db4d96c4b3ac9b6b:/app/controllers/browse_controller.rb diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index c35bb821a..1806558f2 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -2,6 +2,21 @@ class BrowseController < ApplicationController before_filter :authorize_web layout 'site' + def relation_view + begin + @relation = Relation.find(params[:id]) + + @name = @relation.tags['name'].to_s + if @name.length == 0: + @name = "#" + @relation.id.to_s + end + + @title = 'Relation | ' + (@name) + rescue ActiveRecord::RecordNotFound + render :nothing => true, :status => :not_found + end + end + def way_view begin @way = Way.find(params[:id])