mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
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:
parent
5cd580db6f
commit
6ba235d5cc
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue