tracks/app/controllers/preferences_controller.rb
Marcus Ilgner 338d4bb5a6 Added locale selection to preferences
Mostly completed transition to full i18n
Incorporated german translations by Ulf Klose <ulf.klose@gmail.com>
2011-01-16 18:14:07 +01:00

22 lines
505 B
Ruby

class PreferencesController < ApplicationController
def index
@page_title = t('preferences.page_title')
@prefs = prefs
end
def edit
@page_title = t('preferences.page_title_edit')
end
def update
user_updated = current_user.update_attributes(params['user'])
prefs_updated = current_user.preference.update_attributes(params['prefs'])
if user_updated && prefs_updated
redirect_to :action => 'index'
else
render :action => 'edit'
end
end
end