mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00

truncate wants explicit :length => number and :omission calling a partial from a js requires to explicitly pass the variable i.e. :todo => @todo instead of rails doing it implicitly
5 lines
179 B
Ruby
5 lines
179 B
Ruby
module NotesHelper
|
|
def truncated_note(note, characters = 50)
|
|
sanitize(textilize_without_paragraph(truncate(note.body, :length => characters, :omission => "...")))
|
|
end
|
|
end
|