Sha256: 3c2cbe1eb5d94b0c9907d29565e003e22415fa47004d80cefd2b36a041c8a86a

Contents?: true

Size: 770 Bytes

Versions: 9

Compression:

Stored size: 770 Bytes

Contents

# frozen_string_literal: true
require_dependency "think_feel_do_engine/application_controller"

module ThinkFeelDoEngine
  module Coach
    # Enables viewing of an individual message sent by coaches.
    class SentMessagesController < ApplicationController
      before_action :authenticate_user!, :set_group

      def show
        @sent_message = current_user.sent_messages.find(params[:id])
        authorize! :show, @sent_message
        render(
          template: "think_feel_do_engine/messages/show",
          locals: {
            message: @sent_message,
            compose_path: new_coach_group_message_path(@group)
          }
        )
      end

      private

      def set_group
        @group = Group.find(params[:group_id])
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
think_feel_do_engine-3.22.5 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.22.4 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.22.2 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.22.1 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.22.0 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.21.2 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.21.1 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.21.0 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.20.1 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb