Set the default charset to UTF-8 by default (if it hasn't been previously set). This is supposed to fix problems with UTF-8 on Firefox.

Fixes #279



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@244 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2006-05-13 15:02:59 +00:00
parent 5cd580db6f
commit 6ba235d5cc

View file

@ -14,6 +14,13 @@ class ApplicationController < ActionController::Base
before_filter :set_session_expiration
before_filter :get_current_user
after_filter :set_charset
# By default, sets the charset to UTF-8 if it isn't already set
def set_charset
@headers["Content-Type"] ||= "text/html; charset=UTF-8"
end
# Count the number of uncompleted actions, excluding those
# in hidden contexts