Sha256: 0631966941a9d469c118042fca598160b64e1a1e1aaa6f5f8acb39cc4d05ae6d

Contents?: true

Size: 748 Bytes

Versions: 1

Compression:

Stored size: 748 Bytes

Contents

require_dependency "tasks/application_controller"

module Tasks
  class Taskables::Verifications::ConfirmationsController < ApplicationController
    include Concerns::Redirectable

    before_action :set_verification

    def create
      confirmation = @verification.confirmations.new
      confirmation.author = send Tasks.config.author

      respond_to do |format|
        if confirmation.save
          format.html { redirect_to redirect_path_for(confirmation) }
        else
          format.html { render text: 'Failed to confirm verification', status: :unprocessable_entity }
        end
      end
    end

    private

    def set_verification
      @verification = Taskables::Verification.find params[:verification_id]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tasuku-0.0.1 app/controllers/tasks/taskables/verifications/confirmations_controller.rb