mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 15:31:47 +01:00
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@501 a4c988fc-2ded-0310-b66e-134b36920a42
25 lines
No EOL
553 B
Ruby
25 lines
No EOL
553 B
Ruby
class PreferencesController < ApplicationController
|
|
|
|
def index
|
|
@page_title = "TRACKS::Preferences"
|
|
@prefs = @user.preference
|
|
end
|
|
|
|
def edit
|
|
@page_title = "TRACKS::Edit Preferences"
|
|
@prefs = @user.preference
|
|
|
|
render :object => @prefs
|
|
end
|
|
|
|
def update
|
|
user_success = @user.update_attributes(params['user'])
|
|
prefs_success = @user.preference.update_attributes(params['prefs'])
|
|
if user_success && prefs_success
|
|
redirect_to :action => 'index'
|
|
else
|
|
render :action => 'edit'
|
|
end
|
|
end
|
|
|
|
end |