From 488efc3df8f18cd867d3eb9c5b595d7bd8e1d362 Mon Sep 17 00:00:00 2001 From: Christopher Schmidt Date: Sun, 20 Apr 2008 16:11:56 +0000 Subject: [PATCH] drop _view from action names --- app/controllers/browse_controller.rb | 8 ++++---- app/views/browse/_member.rhtml | 2 +- config/routes.rb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index e679442c1..5e55de13b 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -2,7 +2,7 @@ class BrowseController < ApplicationController before_filter :authorize_web layout 'site' - def relation_view + def relation begin @relation = Relation.find(params[:id]) @@ -32,7 +32,7 @@ class BrowseController < ApplicationController end end - def way_view + def way begin @way = Way.find(params[:id]) @@ -62,7 +62,7 @@ class BrowseController < ApplicationController end end - def node_view + def node begin @node = Node.find(params[:id]) @@ -86,7 +86,7 @@ class BrowseController < ApplicationController @name = "#" + @node.id.to_s end - @title = 'Node | ' + (@name) + @title = 'Node History | ' + (@name) rescue ActiveRecord::RecordNotFound render :nothing => true, :status => :not_found end diff --git a/app/views/browse/_member.rhtml b/app/views/browse/_member.rhtml index 0082bc4db..29a72b122 100644 --- a/app/views/browse/_member.rhtml +++ b/app/views/browse/_member.rhtml @@ -1,5 +1,5 @@ - <%= link_to member.member_id.to_s, :action => member.member_type+'_view', :id => member.member_id %> + <%= link_to member.member_id.to_s, :action => member.member_type, :id => member.member_id %> <%= h(member.member_type) %> <%= h(member.member_role) %> diff --git a/config/routes.rb b/config/routes.rb index fa7cd0296..84e6256e1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -55,11 +55,11 @@ ActionController::Routing::Routes.draw do |map| map.connect "api/#{API_VERSION}/swf/trackpoints", :controller =>'swf', :action =>'trackpoints' # Data browsing - map.connect '/browse/way/:id', :controller => 'browse', :action => 'way_view', :id => /\d+/ + map.connect '/browse/way/:id', :controller => 'browse', :action => 'way', :id => /\d+/ map.connect '/browse/way/:id/history', :controller => 'browse', :action => 'way_history', :id => /\d+/ - map.connect '/browse/node/:id', :controller => 'browse', :action => 'node_view', :id => /\d+/ + map.connect '/browse/node/:id', :controller => 'browse', :action => 'node', :id => /\d+/ map.connect '/browse/node/:id/history', :controller => 'browse', :action => 'node_history', :id => /\d+/ - map.connect '/browse/relation/:id', :controller => 'browse', :action => 'relation_view', :id => /\d+/ + map.connect '/browse/relation/:id', :controller => 'browse', :action => 'relation', :id => /\d+/ map.connect '/browse/relation/:id/history', :controller => 'browse', :action => 'relation_history', :id => /\d+/ # web site -- 2.39.5