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