Skip to content

Instantly share code, notes, and snippets.

@morimori
Created May 10, 2010 11:53
Show Gist options
  • Save morimori/395966 to your computer and use it in GitHub Desktop.
Save morimori/395966 to your computer and use it in GitHub Desktop.
=begin
http://doruby.kbmj.com/hogehoge/20100330/Ruby1.9_Rails_#p4
ここの ActionController 用のパッチを Rails3 に対応させたもの
multipart の場合に正常に動くかは未確認
=end
module ActionDispatch
module Http
module Parameters
private
def normalize_parameters_with_force_encoding(value)
(_value = normalize_parameters_without_force_encoding(value)).respond_to?(:force_encoding) ?
_value.force_encoding(Encoding::UTF_8) : _value
end
alias_method_chain :normalize_parameters, :force_encoding
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment