-# Update and read user preferences, which are arbitrayr key/val pairs
+# Update and read user preferences, which are arbitrary key/val pairs
module Api
class UserPreferencesController < ApiController
before_action :authorize
pref.k = params[:preference_key]
end
- pref.v = request.raw_post.chomp
+ pref.v = request.raw_post.chomp.force_encoding("UTF-8")
pref.save!
render :plain => ""