app/models/event_note.rb
# override
# Ensures that text for restricted notes don't get accidentally serialized
# without explicitly asking for them.  The text for restricted notes will always be
# redacted, regardless of the user, unless it is explicitly asked for.
# See also EventNoteRevision#as_json.
override
Ensures that text for restricted notes don't get accidentally serialized
without explicitly asking for them.  The text for restricted notes will always be
redacted, regardless of the user, unless it is explicitly asked for.
override Ensures that text for restricted notes don ' t get accidentally serialized without explicitly asking for them . The text for restricted notes will always be redacted regardless of the user unless it is explicitly asked for .
def as_json(options = {})
    json = super(options)
    return json unless self.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 . 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 restricted notes don't get accidentally serialized
without explicitly asking for them.
override Ensures that text for 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>