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.
This commit is contained in:
Shaun McDonald 2012-01-15 00:59:26 +00:00 committed by Tom Hughes
parent 3369743d6c
commit 0465fda75a
2 changed files with 2 additions and 3 deletions

View file

@ -33,8 +33,7 @@
</tr>
<tr>
<td><%=bbox.min_lon -%></td>
<td>(<a href='/?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' %>'><%= t 'browse.changeset_details.box' %></a>)</td>
<td>(<%= 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') %>)</td>
<td><%=bbox.max_lon -%></td>
</tr>
<tr>

View file

@ -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'