diff --git a/tracks/app/controllers/application.rb b/tracks/app/controllers/application.rb index 79fdb4a5..439bea7c 100644 --- a/tracks/app/controllers/application.rb +++ b/tracks/app/controllers/application.rb @@ -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