# update the entire set of preferences
def update
- old_preferences = @user.preferences.reduce({}) do |preferences, preference|
+ old_preferences = @user.preferences.each_with_object({}) do |preference, preferences|
preferences[preference.k] = preference
- preferences
end
new_preferences = {}