Sha256: 17b848911b8484de0de5800d63729008deb6f751f6d89b3a1c3fe3ea139941eb

Contents?: true

Size: 653 Bytes

Versions: 7

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This cell is intended to be used on profiles.
  class GroupsCell < Decidim::ViewModel
    include Decidim::CellsPaginateHelper
    include Decidim::LayoutHelper
    include Decidim::ApplicationHelper
    include Decidim::LayoutHelper
    include Decidim::Core::Engine.routes.url_helpers
    include Decidim::CardHelper

    def show
      render :show
    end

    def user_groups
      @user_groups ||= Decidim::UserGroups::AcceptedUserGroups.for(model).page(params[:page]).per(20)
    end

    def validation_messages
      [t("decidim.groups.no_user_groups")] if user_groups.blank?
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-core-0.28.4 app/cells/decidim/groups_cell.rb
decidim-core-0.28.3 app/cells/decidim/groups_cell.rb
decidim-core-0.28.2 app/cells/decidim/groups_cell.rb
decidim-core-0.28.1 app/cells/decidim/groups_cell.rb
decidim-core-0.28.0 app/cells/decidim/groups_cell.rb
decidim-core-0.28.0.rc5 app/cells/decidim/groups_cell.rb
decidim-core-0.28.0.rc4 app/cells/decidim/groups_cell.rb