Class: Decidim::Blogs::PostPresenter
Overview
Instance Method Summary
collapse
#decidim_escape_translated, #decidim_html_escape, #decidim_rich_text, #decidim_sanitize, #decidim_sanitize_admin, #decidim_sanitize_editor, #decidim_sanitize_editor_admin, #decidim_sanitize_newsletter, #decidim_sanitize_translated, #decidim_url_escape, included
#linked_classes_filter_values_for, #linked_classes_for, #resource_locator
#editor_locales, #handle_locales
#attachment?, #default_locale?
Instance Method Details
#body(links: false, extras: true, strip_tags: false, all_locales: false) ⇒ Object
35
36
37
38
39
|
# File 'decidim-blogs/app/presenters/decidim/blogs/post_presenter.rb', line 35
def body(links: false, extras: true, strip_tags: false, all_locales: false)
return unless post
content_handle_locale(post.body, all_locales, , links, strip_tags)
end
|
#post ⇒ Object
21
22
23
|
# File 'decidim-blogs/app/presenters/decidim/blogs/post_presenter.rb', line 21
def post
__getobj__
end
|
#taxonomy_names(html_escape: false, all_locales: false) ⇒ Object
41
42
43
44
45
|
# File 'decidim-blogs/app/presenters/decidim/blogs/post_presenter.rb', line 41
def taxonomy_names(html_escape: false, all_locales: false)
post.taxonomies.map do |taxonomy|
taxonomy.presenter.title(links: false, html_escape:, all_locales:)
end
end
|
#title(links: false, html_escape: false, all_locales: false) ⇒ Object
29
30
31
32
33
|
# File 'decidim-blogs/app/presenters/decidim/blogs/post_presenter.rb', line 29
def title(links: false, html_escape: false, all_locales: false)
return unless post
super(post.title, links, html_escape, all_locales)
end
|