1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/controllers/passport_confirmations_controller.rb

26 lines
588 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class PassportConfirmationsController < ApplicationController
before_action :authenticate_user!
before_action :set_passport, only: :create
# POST /passports/:passport_id/passport_confirmations
def create
2018-11-30 19:40:34 -05:00
ActiveRecord::Base.transaction do
ConfirmPassport.call(passport: @passport,
user: current_user).tap do |context|
authorize context.passport_confirmation
end
end
redirect_to @passport
end
private
def set_passport
@passport = Passport.find params[:passport_id]
end
end