class Note
Constants
- MAX_BODY_LENGTH
- MAX_TITLE_LENGTH
Private Instance Methods
ensure_title_has_a_value()
click to toggle source
# File lib/generators/jinda_engine/templates/app/models/note.rb, line 14 def ensure_title_has_a_value if title.blank? self.title = body[0..(MAX_TITLE_LENGTH-1)] unless body.blank? end end