|
[Rails I18n] issues with globalize code from Rails Recipes: msg#00018lang.ruby.rails.i18n
I'm looking into using globalize for our corp intranet. I'm following the instructions from the Rails Recipes book. One issue I have come across involves the following snippet of code: class ApplicationController < ActionController::Base after_filter :set_charset def set_charset unless @headers["Content-Type"] =~ /charset/i @headers["Content-Type"] ||= "" @headers["Content-Type"] += "; charset=utf-8" end end end this is directly from the book. what i am noticing is that the response headers are coming back to the browser as: Content-Type: ;charset=utf-8 notice there is no actual content-type. if i force it to text/html @headers["Content-Type"] ||= "text/html" i then see that the content-type is now set correctly and rjs appears to still work so I am wondering if this is a typo in the code from the book or is it something more. Chris -- Posted via http://www.ruby-forum.com/.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [Rails I18n] Globalize and acts_as_versioned, Eli Kroumova |
|---|---|
| Next by Date: | [Rails I18n] Mailing List?, Chris Anderson |
| Previous by Thread: | [Rails I18n] Globalize and acts_as_versioned, Eli Kroumova |
| Next by Thread: | [Rails I18n] Mailing List?, Chris Anderson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |