Class: Decidim::Budgets::ProjectPresenter

Inherits:
ResourcePresenter show all
Defined in:
decidim-budgets/app/presenters/decidim/budgets/project_presenter.rb

Instance Method Summary collapse

Methods inherited from ResourcePresenter

#editor_locales, #handle_locales

Methods included from SanitizeHelper

#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

Methods included from TranslatableAttributes

#attachment?, #default_locale?

Instance Method Details

#title(html_escape: false, all_locales: false) ⇒ String

Renders the title of the project

Parameters:

  • html_escape (Boolean) (defaults to: false)

    Should HTML entities within the title be escaped? Default is false.

  • all_locales (Boolean) (defaults to: false)

    Should the title be returned for all locales? Default is false.

Returns:

  • (String)

    The title of the project.



11
12
13
14
15
# File 'decidim-budgets/app/presenters/decidim/budgets/project_presenter.rb', line 11

def title(html_escape: false, all_locales: false)
  return unless project

  super(project.title, html_escape, all_locales)
end