Remove unused set_home method from user controller.

This commit is contained in:
Tom Hughes 2010-02-27 00:02:22 +00:00
parent c55490d24e
commit fbe529d87e
2 changed files with 2 additions and 14 deletions

View file

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

View file

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