tracks/app/controllers/preferences_controller.rb
Eric Allen deafad16c0 Get rid of weird render params
This line caused the page to not get a layout in Rails 2.3.5

Fixes #988
2010-01-17 11:33:35 -08:00

22 lines
493 B
Ruby

class PreferencesController < ApplicationController
def index
@page_title = "TRACKS::Preferences"
@prefs = prefs
end
def edit
@page_title = "TRACKS::Edit Preferences"
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