app/models/classification_curation.rb
# The ugliness of this method is born of the need (or desire) to create only ONE notification (but to leave two
# logs if required).
The ugliness of this method is born of the need (or desire) to create only ONE notification (but to leave two
logs if required).
The ugliness of this method is born of the need ( or desire ) to create only ONE notification ( but to leave two logs if required ) .
def log_unlock_and_notify(activity, options = {})
    activity_log = nil
    if moved_from
      activity_log = leave_log_on_taxon(moved_from, activity, options)
    end
    if moved_to && activity_log.nil?
      activity_log = leave_log_on_taxon(moved_to, activity, options)
    end
    if activity_log
      force_immediate_notification_of(activity_log)
    else
      logger.error "** ERROR: #{self} not reported; no activity log was created."
    end
  end
def log_unlock_and_notify ( activity , options = { } ) activity_log = nil if moved_from activity_log = leave_log_on_taxon ( moved_from , activity , options ) end if moved_to && activity_log . nil? activity_log = leave_log_on_taxon ( moved_to , activity , options ) end if activity_log force_immediate_notification_of ( activity_log ) else logger . error "** ERROR: #{self} not reported; no activity log was created." end end
The ugliness of this method is born of the need (or desire) to create only ONE notification (but to leave two
logs if required).
The ugliness of this method is born of the need ( or desire ) to create only ONE notification ( but to leave two logs if required ) .
activity
<not_specific>
options
<not_specific>