Sha256: bd583ab36d62ea2f831da2eb80a8e8c6339fd1b1ef26bd4f8b4b4dc95332c486

Contents?: true

Size: 637 Bytes

Versions: 4

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class ProfileCell < Decidim::ViewModel
    include Decidim::ApplicationHelper
    include Decidim::Core::Engine.routes.url_helpers
    include Decidim::UserProfileHelper
    include Decidim::AriaSelectedLinkToHelper
    include ActiveLinkTo

    delegate :current_organization, :current_user, to: :controller

    def show
      render :show
    end

    def user
      model
    end

    def content_cell
      context[:content_cell]
    end

    def active_content
      context[:active_content]
    end

    def own_profile?
      current_user && current_user == user
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-core-0.14.4 app/cells/decidim/profile_cell.rb
decidim-core-0.14.3 app/cells/decidim/profile_cell.rb
decidim-core-0.14.2 app/cells/decidim/profile_cell.rb
decidim-core-0.14.1 app/cells/decidim/profile_cell.rb