Method: Cms::Behaviors::Attaching::InstanceMethods#check_for_updated_attachments

Defined in:
lib/cms/behaviors/attaching.rb

#check_for_updated_attachmentsObject

This ensures that if a change is made to an attachment, that this model is also marked as changed. Otherwise, if the change isn’t detected, this record won’t save a new version (since updates are rejected if no changes were made)



223
224
225
226
227
# File 'lib/cms/behaviors/attaching.rb', line 223

def check_for_updated_attachments
  if attachments_changed == "true" || attachments_were_updated?
    changed_attributes['attachments'] = "Uploaded new files"
  end
end