Class: Decidim::Votings::ContentBlocks::HeroCell

Inherits:
ContentBlocks::ParticipatorySpaceHeroCell
  • Object
show all
Defined in:
app/cells/decidim/votings/content_blocks/hero_cell.rb

Instance Method Summary collapse

Instance Method Details

#cta_pathObject



23
24
25
26
27
# File 'app/cells/decidim/votings/content_blocks/hero_cell.rb', line 23

def cta_path
  return unless model

  @cta_path ||= translated_attribute(model.settings.button_url).presence
end

#cta_textObject



17
18
19
20
21
# File 'app/cells/decidim/votings/content_blocks/hero_cell.rb', line 17

def cta_text
  return unless model

  @cta_text ||= translated_attribute(model.settings.button_text).presence
end

#has_hashtag?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/cells/decidim/votings/content_blocks/hero_cell.rb', line 9

def has_hashtag?
  false
end

#subtitleObject



13
14
15
# File 'app/cells/decidim/votings/content_blocks/hero_cell.rb', line 13

def subtitle
  "#{start_text}#{end_text}"
end