Sha256: 1d87a913ce5d21c6a3787d55b19adc3b4797e5ed755f022dc0e0290d65c1a142
Contents?: true
Size: 731 Bytes
Versions: 16
Compression:
Stored size: 731 Bytes
Contents
class Dorsale::Flyboy::TaskCommentsController < ::Dorsale::Flyboy::ApplicationController def create skip_policy_scope @task_comment ||= model.new(task_comment_params_for_create) @task ||= @task_comment.task authorize @task, :update? if @task_comment.save redirect_to @task else render "dorsale/flyboy/tasks/show" end end private def model ::Dorsale::Flyboy::TaskComment end def permitted_params [ :task_id, :progress, :description, ] end def task_comment_params params.fetch(:task_comment, {}).permit(permitted_params) end def task_comment_params_for_create task_comment_params.merge(author: current_user) end end
Version data entries
16 entries across 16 versions & 1 rubygems