Commit 13fec18ac9cbdecdef3b0e5fb7dd7480e9d7cbbf
1 parent
c9f741bb
Exists in
master
and in
4 other branches
Truncate some text from dashboard events
Showing
3 changed files
with
11 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
app/helpers/events_helper.rb
... | ... | @@ -123,6 +123,8 @@ module EventsHelper |
123 | 123 | end |
124 | 124 | |
125 | 125 | def event_note(text) |
126 | - sanitize(markdown(truncate(text, length: 150)), tags: %w(a img b pre p)) | |
126 | + text = first_line(text) | |
127 | + text = truncate(text, length: 150) | |
128 | + sanitize(markdown(text), tags: %w(a img b pre p)) | |
127 | 129 | end |
128 | 130 | end | ... | ... |
app/views/events/event/_push.html.haml