Method: Thredded::ApplicationHelper#render_posts
- Defined in:
- app/helpers/thredded/application_helper.rb
#render_posts(posts, partial: 'thredded/posts/post', content_partial: 'thredded/posts/content', locals: {}) ⇒ Object
74 75 76 77 78 79 |
# File 'app/helpers/thredded/application_helper.rb', line 74 def render_posts(posts, partial: 'thredded/posts/post', content_partial: 'thredded/posts/content', locals: {}) posts_with_contents = render_collection_to_strings_with_cache( partial: content_partial, collection: posts, as: :post, expires_in: 1.week ) render partial: partial, collection: posts_with_contents, as: :post_and_content, locals: locals end |