app/models/event_note_revision.rb
# override
# Ensures that text for revisions on restricted notes don't get accidentally
# serialized without explicitly asking for them.  See also EventNote#as_json.
override
Ensures that text for revisions on restricted notes don't get accidentally
serialized without explicitly asking for them.
override Ensures that text for revisions on restricted notes don ' t get accidentally serialized without explicitly asking for them .
def as_json(options = {})
    json = super(options)
    return json unless self.event_note.is_restricted
    return json unless json.has_key?('text')
    return json if options[:dangerously_include_restricted_note_text]
    json.merge('text' => '<redacted>')
  end
def as_json ( options = { } ) json = super ( options ) return json unless self . event_note . is_restricted return json unless json . has_key? ( 'text' ) return json if options [ :dangerously_include_restricted_note_text ] json . merge ( 'text' => '<redacted>' ) end
override
Ensures that text for revisions on restricted notes don't get accidentally
serialized without explicitly asking for them.
override Ensures that text for revisions on restricted notes don ' t get accidentally serialized without explicitly asking for them .
# unrestricted notes are safe to serialize # if a restricted note isn't serializing the text content it's okay # allow a dangerous manual override # redact text content
options
<not_specific>