Extract rendering to helper method. Shift filename sanitization to controller.

This commit is contained in:
Jan-Yves Ruzicka 2015-04-03 12:13:21 +01:00
parent 7801364662
commit ccf13418f4
12 changed files with 105 additions and 78 deletions

View file

@ -1,10 +1,10 @@
module NotesHelper
def truncated_note(note, characters = 50)
Tracks::Utils.render_text(truncate(note.body, :length => characters, :omission => "..."))
render_text(truncate(note.body, :length => characters, :omission => "..."))
end
def rendered_note(note)
Tracks::Utils.render_text(note.body)
render_text(note.body)
end
def link_to_delete_note(note, descriptor = sanitize(note.id.to_s))