Sha256: 6761ccf560a84b9b461073ae90c7068b5153af91c58454d642ba4d9428e2c373

Contents?: true

Size: 740 Bytes

Versions: 51

Compression:

Stored size: 740 Bytes

Contents

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

51 entries across 51 versions & 1 rubygems

Version Path
think_feel_do_engine-3.12.7 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.12.6 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.12.5 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.12.4 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.12.3 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.12.2 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.12.1 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.12.0 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.11.3 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.11.0 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb
think_feel_do_engine-3.10.10 app/controllers/think_feel_do_engine/coach/sent_messages_controller.rb