Added a META HTTP-EQUIV=REFRESH value to the standard layout template. The refresh value is taken from user preferences, and defaults to zero so that the page doesn't refresh automatically.

If you're using the trunk, you'll need to run rake db:migrate to update your user preferences.

Fixes #295



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@290 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2006-07-23 13:33:52 +00:00
parent d1b74bc2bf
commit 803a9db6ae
11 changed files with 48 additions and 18 deletions

View file

@ -64,7 +64,8 @@ class ApplicationController < ActionController::Base
private
def get_current_user
@user = User.find(session['user_id']) if session['user_id']
@user = User.find(session['user_id']) if session['user_id']
@prefs = @user.preferences unless @user.nil?
end
def get_admin_user

View file

@ -28,7 +28,8 @@ class UserController < ApplicationController
"no_completed" => "#{params['prefs']['no_completed']}",
"staleness_starts" => "#{params['prefs']['staleness_starts']}",
"due_style" => "#{params['prefs']['due_style']}",
"admin_email" => "#{params['prefs']['admin_email']}"
"admin_email" => "#{params['prefs']['admin_email']}",
"refresh" => "#{params['prefs']['refresh']}"
}
if @user.save
redirect_to :action => 'preferences'