Sha256: fd3db35e6806bf452c72cf49d9b55201335aeb973240077702880a62b4d262ca
Contents?: true
Size: 736 Bytes
Versions: 51
Compression:
Stored size: 736 Bytes
Contents
require_dependency "think_feel_do_engine/application_controller" module ThinkFeelDoEngine module Participants # Manage Participant Thoughts. class ThoughtsController < ApplicationController before_action :authenticate_participant! def create @thought = current_participant.thoughts.find(thought_id) @thought.update(thought_params) end private def thought_id params[:thoughts][:commit_id].keys.first || -1 end def thought_params params.require(:thoughts) .permit(thought_id => [ :content, :effect, :pattern_id, :challenging_thought, :act_as_if ]) .fetch(thought_id) end end end end
Version data entries
51 entries across 51 versions & 1 rubygems