Sha256: 7a877820989abd77af623bc4fa5e1024d4f77b8bfe613cbaccbfab0796866a6f

Contents?: true

Size: 897 Bytes

Versions: 18

Compression:

Stored size: 897 Bytes

Contents

require_dependency "think_feel_do_engine/application_controller"

module ThinkFeelDoEngine
  module Coach
    # Present Participant Thoughts Visualization to the Coach.
    class ParticipantThoughtsVisualizationsController < ApplicationController
      before_action :authenticate_user!
      rescue_from ActiveRecord::RecordNotFound, with: :record_not_found

      def show
        @participant = Participant.find(params[:participant_id])
        @group = @participant.groups.find(params[:group_id])
        thoughts = @participant.thoughts.harmful
        render "think_feel_do_engine/thoughts/distortion_viz",
               locals: { thoughts: thoughts, link_to_view: nil }
      end

      def record_not_found
        redirect_to main_app.root_path,
                    alert: "The thoughts visualization you were "\
                    "looking does not exist."
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
think_feel_do_engine-3.19.9 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.8 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.7 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.6 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.5 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.4 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.3 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.2 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.1 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.19.0 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.18.0 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.17.2 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.17.1 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.17.0 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.16.3 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.16.2 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.16.1 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb
think_feel_do_engine-3.16.0 app/controllers/think_feel_do_engine/coach/participant_thoughts_visualizations_controller.rb