Module: Decidim::FollowableHelper

Included in:
AuthorCell, Blogs::ApplicationHelper, Debates::ApplicationHelper, Meetings::ApplicationHelper, Proposals::ApplicationHelper
Defined in:
decidim-core/app/helpers/decidim/followable_helper.rb

Overview

A Helper for views with Followable resources.

Instance Method Summary collapse

Instance Method Details

#follow_button_for(model, large = nil, opts = {}) ⇒ Object

Invokes the decidim/shared/follow_button partial.



7
8
9
10
11
12
# File 'decidim-core/app/helpers/decidim/followable_helper.rb', line 7

def follow_button_for(model, large = nil, opts = {})
  controller.view_context.render(
    partial: "decidim/shared/follow_button",
    locals: { followable: model, large:, opts: opts.slice(:button_classes, :text_classes, :icon_classes) }
  )
end