def preference_changes(group = nil)
      preferences_changed(group).inject({}) do |changes, preference|
        changes[preference] = preference_change(preference, group)
        changes
      end
    end
def preference_changes(group = nil)
      preferences_changed(group).inject({}) do |changes, preference|
        changes[preference] = preference_change(preference, group)
        changes
      end
    end
A map of the preferences that have changed in the current object.

 == Examples

   user = User.find(:first)
   user.preferred(:color)                      # => nil
   user.preference_changes                     # => {}

   user.write_preference(:color, 'red')
   user.preference_changes                     # => {"color" => [nil, "red"]}
   user.save
   user.preference_changes                     # => {}

   # Groups
   user.preferred(:color, :car)                # => nil
   user.preference_changes(:car)               # => {}
   user.write_preference(:color, 'red', :car)
   user.preference_changes(:car)               # => {"color" => [nil, "red"]}