mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-20 22:24:09 +01:00
Divide UserController into a UserController and a PreferencesController. Divide FeedController into a FeedController and a FeedlistController. Pull up layout and login filter into ApplicationController and override as needed. Ignored new tmp directories.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@376 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
1e4f462f21
commit
1d22f08670
25 changed files with 218 additions and 88 deletions
25
tracks/app/controllers/preferences_controller.rb
Normal file
25
tracks/app/controllers/preferences_controller.rb
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue