Sha256: 678943229f97e054d61cf70b3e7a1a75653223d78e877773de68e5297aa90373

Contents?: true

Size: 507 Bytes

Versions: 7

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class ConversationCell < Decidim::ViewModel
    include Decidim::Core::Engine.routes.url_helpers
    include ActionView::Helpers::DateHelper

    delegate :current_user, to: :controller

    def show
      @form = Decidim::Messaging::MessageForm.new
      render :show
    end

    def recipient
      @recipient ||= conversation.interlocutors(current_user).first
    end

    def conversation
      @conversation ||= context[:conversation]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-core-0.15.2 app/cells/decidim/conversation_cell.rb
decidim-core-0.15.1 app/cells/decidim/conversation_cell.rb
decidim-core-0.15.0 app/cells/decidim/conversation_cell.rb
decidim-core-0.14.4 app/cells/decidim/conversation_cell.rb
decidim-core-0.14.3 app/cells/decidim/conversation_cell.rb
decidim-core-0.14.2 app/cells/decidim/conversation_cell.rb
decidim-core-0.14.1 app/cells/decidim/conversation_cell.rb