Sha256: 0bd1c11c01918f3bc11dce33c560c85827fb543944c82b452722999caeee0950

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class FollowingCell < Decidim::ViewModel
    include Decidim::CellsPaginateHelper
    include Decidim::ApplicationHelper
    include Decidim::Core::Engine.routes.url_helpers
    include Decidim::CardHelper

    def show
      render :show
    end

    def followings
      @followings ||= Kaminari.paginate_array(following_users).page(params[:page]).per(20)
    end

    def following_users
      @following_users ||= model.following.select do |following|
        following.is_a?(Decidim::User)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-core-0.13.1 app/cells/decidim/following_cell.rb
decidim-core-0.12.2 app/cells/decidim/following_cell.rb
decidim-core-0.13.0 app/cells/decidim/following_cell.rb
decidim-core-0.12.1 app/cells/decidim/following_cell.rb
decidim-core-0.13.0.pre1 app/cells/decidim/following_cell.rb
decidim-core-0.12.0 app/cells/decidim/following_cell.rb
decidim-core-0.12.0.pre app/cells/decidim/following_cell.rb