mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-02 07:18:49 +01:00
Extract rendering to helper method. Shift filename sanitization to controller.
This commit is contained in:
parent
7801364662
commit
ccf13418f4
12 changed files with 105 additions and 78 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue