mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-26 02:33:03 -04:00
* HAML * rewrite * Fix specs - but likely still wrong * Return temple * Trailing line * Fix specs * This was rearranged, apparently. * Fix tests * Retain escaping * Fix specs * Rubocop * Attempt to fix rendering * Fix output * Move away from filter * Move away from filter * Fix spec * Fix specs * Fix structure to avoid nested paragraph tags
8 lines
162 B
Ruby
8 lines
162 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PostsHelper
|
|
def post_stripped_tags(post, length: 300)
|
|
truncate(strip_tags(markdownify(post.body)), length:)
|
|
end
|
|
end
|