Module: Decidim::CardHelper

Included in:
CardMCell, CollapsibleListCell, FollowersCell, FollowingCell
Defined in:
app/helpers/decidim/card_helper.rb

Overview

Helpers related to icons

Instance Method Summary collapse

Instance Method Details

#card_for(model, options = {}) ⇒ Object

Public: Returns a card given an instance of a Component.

model - The component instance to generate the card for. options - a Hash with options, for the size of the card

Returns an HTML.



12
13
14
15
16
# File 'app/helpers/decidim/card_helper.rb', line 12

def card_for(model, options = {})
  options = { context: { current_user: current_user } }.deep_merge(options)

  cell "decidim/card", model, options
end