# frozen_string_literal: true
class PassportsController < ApplicationController
before_action :set_passport, except: %i[index new]
# GET /passports
def index
@passports = policy_scope(Passport)
end
# GET /passports/:id
def show
authorize @passport
# GET /passports/new
def new
@passport = Passport.new
private
def set_passport
@passport = Passport.find params[:id]