Sha256: 5b8443bc175bb32e134f26bdc0d1d4147f15e1ac93a7a2040e8c7348bf5a472e
Contents?: true
Size: 927 Bytes
Versions: 13
Compression:
Stored size: 927 Bytes
Contents
# frozen_string_literal: true 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
13 entries across 13 versions & 1 rubygems