From 0465fda75a244123ae35e6ca34f9e1fff4232efa Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Sun, 15 Jan 2012 00:59:26 +0000 Subject: [PATCH 1/1] Railsify the box link on the browse changeset page This removes the whitespace in the url, and makes the root path a named route so that it can be nicely referenced. --- app/views/browse/_changeset_details.html.erb | 3 +-- config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/browse/_changeset_details.html.erb b/app/views/browse/_changeset_details.html.erb index 2d7808137..eb90fad10 100644 --- a/app/views/browse/_changeset_details.html.erb +++ b/app/views/browse/_changeset_details.html.erb @@ -33,8 +33,7 @@ <%=bbox.min_lon -%> - ('><%= t 'browse.changeset_details.box' %>) + (<%= link_to t('browse.changeset_details.box'), root_path(:minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => 'yes'), :title => t('browse.changeset_details.show_area_box') %>) <%=bbox.max_lon -%> diff --git a/config/routes.rb b/config/routes.rb index fa7dd5ba0..267de7956 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -93,7 +93,7 @@ OpenStreetMap::Application.routes.draw do match '/browse' => 'changeset#list' # web site - match '/' => 'site#index' + root :to => 'site#index' match '/edit' => 'site#edit' match '/copyright' => 'site#copyright' match '/copyright/:copyright_locale' => 'site#copyright' -- 2.43.2