From: Steve Coast Date: Sat, 7 Apr 2007 19:00:23 +0000 (+0000) Subject: move stuff around X-Git-Tag: live~8528 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6fe1a503b61cdb1216625ef71d9134b009fd3af2 move stuff around --- diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 3c7d3ff82..748200834 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -2,11 +2,6 @@ class SiteController < ApplicationController before_filter :authorize_web before_filter :require_user, :only => [:edit] - - def search - @tags = WayTag.find(:all, :limit => 11, :conditions => ["match(v) against (?)", params[:query][:query].to_s] ) - end - def goto_way way = Way.find(params[:id]) diff --git a/app/controllers/way_segment_controller.rb b/app/controllers/way_segment_controller.rb index fb3c09cbd..e37303f3e 100644 --- a/app/controllers/way_segment_controller.rb +++ b/app/controllers/way_segment_controller.rb @@ -1,2 +1,5 @@ class WaySegmentController < ApplicationController + + + end diff --git a/app/controllers/way_tag_controller.rb b/app/controllers/way_tag_controller.rb index 16763b356..5c6ac6617 100644 --- a/app/controllers/way_tag_controller.rb +++ b/app/controllers/way_tag_controller.rb @@ -1,2 +1,8 @@ class WayTagController < ApplicationController + + def search + @tags = WayTag.find(:all, :limit => 11, :conditions => ["match(v) against (?)", params[:query][:query].to_s] ) + end + + end diff --git a/app/views/site/search.rhtml b/app/views/way_tag/search.rhtml similarity index 100% rename from app/views/site/search.rhtml rename to app/views/way_tag/search.rhtml diff --git a/config/routes.rb b/config/routes.rb index b34948a6c..ca19c9668 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -30,7 +30,7 @@ ActionController::Routing::Routes.draw do |map| map.connect '/', :controller => 'site', :action => 'index' map.connect '/index.html', :controller => 'site', :action => 'index' map.connect '/edit.html', :controller => 'site', :action => 'edit' - map.connect '/search.html', :controller => 'site', :action => 'search' + map.connect '/search.html', :controller => 'way_tag', :action => 'search' map.connect '/login.html', :controller => 'user', :action => 'login' map.connect '/logout.html', :controller => 'user', :action => 'logout' map.connect '/create-account.html', :controller => 'user', :action => 'new'