Sha256: 44453f29c18e67d240f923e236db7ba577f595636f98478ade9ed7db297036cf

Contents?: true

Size: 459 Bytes

Versions: 13

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # A Helper for views with Followable resources.
  module FollowableHelper
    # Invokes the decidim/shared/follow_button partial.
    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
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/helpers/decidim/followable_helper.rb
decidim-core-0.28.4 app/helpers/decidim/followable_helper.rb
decidim-core-0.29.0 app/helpers/decidim/followable_helper.rb
decidim-core-0.28.3 app/helpers/decidim/followable_helper.rb
decidim-core-0.29.0.rc4 app/helpers/decidim/followable_helper.rb
decidim-core-0.29.0.rc3 app/helpers/decidim/followable_helper.rb
decidim-core-0.29.0.rc2 app/helpers/decidim/followable_helper.rb
decidim-core-0.29.0.rc1 app/helpers/decidim/followable_helper.rb
decidim-core-0.28.2 app/helpers/decidim/followable_helper.rb
decidim-core-0.28.1 app/helpers/decidim/followable_helper.rb
decidim-core-0.28.0 app/helpers/decidim/followable_helper.rb
decidim-core-0.28.0.rc5 app/helpers/decidim/followable_helper.rb
decidim-core-0.28.0.rc4 app/helpers/decidim/followable_helper.rb