tracks/app/helpers/notes_helper.rb
Reinier Balt 198f3240b8 fix several deprecation warnings
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
2008-11-30 20:16:57 +01:00

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