Class: Note

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/note.rb

Instance Method Summary collapse

Instance Method Details

#note_type_descObject



13
14
15
# File 'app/models/note.rb', line 13

def note_type_desc
  self.note_type.description
end

#summaryObject



17
18
19
# File 'app/models/note.rb', line 17

def summary
  (content.length > 20) ? "#{content[0..20]}..." : content
end

#to_sObject



21
22
23
# File 'app/models/note.rb', line 21

def to_s
  summary
end