Module: Homeland::Note::ApplicationHelper

Defined in:
app/helpers/homeland/note/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#note_title_tag(note, opts = {}) ⇒ Object



3
4
5
6
7
8
# File 'app/helpers/homeland/note/application_helper.rb', line 3

def note_title_tag(note, opts = {})
  opts[:limit] ||= 50
  return '' if note.blank?
  return '' if note.title.blank?
  truncate(note.title.delete('#'), length: opts[:limit])
end