Sha256: 164c2255971be0275840309a84f45bf2c4e894dfd2742c8ac8c616919fd4cc24

Contents?: true

Size: 674 Bytes

Versions: 4

Compression:

Stored size: 674 Bytes

Contents

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

4 entries across 4 versions & 1 rubygems

Version Path
think_feel_do_engine-3.10.9 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.10.8 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.10.7 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.10.6 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb