Reputation: 11107
I'm receiving this error whenever I edit an user's information. The localhost tells me that the error occured around this line...
<%= debug(params) if Rails.env.development? %>
Parameters returned...
{"utf8"=>"✓",
"_method"=>"put",
"authenticity_token"=>"hC/BQTSBodv+qlvhYnxJ4mqMl+w3G1FLwopxpbmsm/g=",
"user"=>{"name"=>"jason",
"email"=>"jason1",
"password"=>"[FILTERED]",
"password_confirmation"=>"[FILTERED]"},
"commit"=>"Save changes",
"id"=>"7"}
What's causing this error and how do I fix it?
Upvotes: 2
Views: 1622
Reputation: 45295
config.encoding = "utf-8"
in your application.rb file.Add this code in your environment.rb:
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
If you are working with MySql use the "mysql2" gem.
# encoding: utf-8
at the top of your file.Upvotes: 2