mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-05 15:11:01 -05:00
8 lines
216 B
Ruby
8 lines
216 B
Ruby
module PostsHelper
|
|
def display_post_truncated(post)
|
|
length = 300
|
|
truncate(strip_tags(post.body), length: length,
|
|
separator: ' ', omission: '... ') { link_to "Read more", post_path(post) }
|
|
end
|
|
end
|