Project

General

Profile

Actions

Bug #4991

open

[API] Make user.send_profile_created_notification detect preference changes better

Added by Tim Pierce over 9 years ago. Updated about 9 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
Story points:
1.0

Description

In Rails 3.2.0, a serialized field (like User.prefs) is always written when the field is saved, and the synthetic _changed? method always returns false. See https://github.com/rails/rails/issues/8328 for more context.

This means that User.send_profile_created_notification should never have worked in the first place:

  def send_profile_created_notification
    if self.prefs_changed?
      ...
    end
  end

Check to see if we need to fix this and how.

Actions #1

Updated by Brett Smith about 9 years ago

  • Subject changed from [API] fix user.send_profile_created_notification to [API] Make user.send_profile_created_notification detect preference changes better
Actions #2

Updated by Tom Clegg about 9 years ago

  • Target version changed from Bug Triage to Deferred

Could add a comment about shortcomings of this trigger. API "update" call always replaces the hash with a new one.

Actions

Also available in: Atom PDF