Class: Decidim::Posts::ReactionsCell

Inherits:
ViewModel
  • Object
show all
Includes:
Cell::ViewModel::Partial, PostCellsHelper, ReactionHelper
Defined in:
app/cells/decidim/posts/reactions_cell.rb

Instance Method Summary collapse

Methods included from ReactionHelper

#reaction_icon

Methods included from PostCellsHelper

#component_settings, #current_component, #current_settings, #participatory_space

Methods included from ApplicationHelper

#category_label, #category_label_singular, #posts_component_for_meeting

Instance Method Details

#grouped_reactions_for(resource) ⇒ Object



16
17
18
# File 'app/cells/decidim/posts/reactions_cell.rb', line 16

def grouped_reactions_for(resource)
  resource.reactions.group_by(&:reaction_type)
end

#postObject



12
13
14
# File 'app/cells/decidim/posts/reactions_cell.rb', line 12

def post
  model
end

#showObject



8
9
10
# File 'app/cells/decidim/posts/reactions_cell.rb', line 8

def show
  render :show
end