From: Tom Hughes Date: Sat, 27 Feb 2010 00:02:22 +0000 (+0000) Subject: Remove unused set_home method from user controller. X-Git-Tag: live~6888^2~2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/fbe529d87e61ab63bcf749067422ab2cbbb655d0 Remove unused set_home method from user controller. --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index c8adc214e..c181da305 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -4,9 +4,9 @@ class UserController < ApplicationController before_filter :authorize, :only => [:api_details, :api_gpx_files] before_filter :authorize_web, :except => [:api_details, :api_gpx_files] before_filter :set_locale, :except => [:api_details, :api_gpx_files] - before_filter :require_user, :only => [:set_home, :account, :go_public, :make_friend, :remove_friend] + before_filter :require_user, :only => [:account, :go_public, :make_friend, :remove_friend] before_filter :check_database_readable, :except => [:api_details, :api_gpx_files] - before_filter :check_database_writable, :only => [:login, :new, :set_home, :account, :go_public, :make_friend, :remove_friend] + before_filter :check_database_writable, :only => [:login, :new, :account, :go_public, :make_friend, :remove_friend] before_filter :check_api_readable, :only => [:api_details, :api_gpx_files] before_filter :require_allow_read_prefs, :only => [:api_details] before_filter :require_allow_read_gpx, :only => [:api_gpx_files] @@ -91,17 +91,6 @@ class UserController < ApplicationController end end - def set_home - if params[:user][:home_lat] and params[:user][:home_lon] - @user.home_lat = params[:user][:home_lat].to_f - @user.home_lon = params[:user][:home_lon].to_f - if @user.save - flash[:notice] = t 'user.set_home.flash success' - redirect_to :controller => 'user', :action => 'account' - end - end - end - def go_public @user.data_public = true @user.save diff --git a/config/routes.rb b/config/routes.rb index 856dcd9f4..0c0e62849 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -156,7 +156,6 @@ ActionController::Routing::Routes.draw do |map| map.connect '/user/:display_name/diary/:id/hide', :controller => 'diary_entry', :action => 'hide', :id => /\d+/ map.connect '/user/:display_name/diary/:id/hidecomment/:comment', :controller => 'diary_entry', :action => 'hidecomment', :id => /\d+/, :comment => /\d+/ map.connect '/user/:display_name/account', :controller => 'user', :action => 'account' - map.connect '/user/:display_name/set_home', :controller => 'user', :action => 'set_home' map.connect '/user/:display_name/activate', :controller => 'user', :action => 'activate' map.connect '/user/:display_name/deactivate', :controller => 'user', :action => 'deactivate' map.connect '/user/:display_name/hide', :controller => 'user', :action => 'hide'