Displaying 2 results from an estimated 2 matches for "actionpack_filt".
2006 Jan 05
1
unicode hacks - fixes for webrick and Safari
...ode is not affected. There is some Rails code run before/after the
filters, so it is not completely fullproof solution. Maybe some Rails
code which runs before/after filters would need Unicode string
processing - it doesn''t seem likely to me, but you never know.
I have modified file actionpack_filters.rb, where I added the
following private methods:
def set_kcode_utf8
@old_kcode = $KCODE
$KCODE = ''u''
end
def restore_kcode
$KCODE = @old_kcode
end
and added these two as filters in init.rb:
Object::ActionController::Base.send(:befo...
2006 Apr 23
0
Using unicode_hacks breaks Rails 1.1 RJS
...t;unicode_hacks":http://julik.textdriven.com/svn/tools/rails_plugins/unicode_hacks/
for "multi-lingual
support":[http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings/versions/40]
(i18n), there''s a gotcha - RJS templates will not work.
The culprit is line #4 in lib\actionpack_filters.rb, which sets the
character set in the HTTP header to UTF so that old browsers can render
the properly. It also sets the content-type to text/html. For RJS, the
content-type needs to be text/javascript.
Here''s a quick fix that worked for me, replace line #4 with
response.headers[&quo...