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/passports_controller.rb

28 lines
451 B
Ruby
Raw Normal View History

2018-11-29 20:37:02 -05:00
# frozen_string_literal: true
class PassportsController < ApplicationController
2018-11-29 23:20:02 -05:00
before_action :set_passport, except: %i[index new]
2018-11-29 21:34:46 -05:00
2018-11-29 20:37:02 -05:00
# GET /passports
def index
@passports = policy_scope(Passport)
end
2018-11-29 21:34:46 -05:00
# GET /passports/:id
def show
authorize @passport
end
2018-11-29 23:07:45 -05:00
# GET /passports/new
def new
@passport = Passport.new
authorize @passport
end
2018-11-29 21:34:46 -05:00
private
def set_passport
@passport = Passport.find params[:id]
end
2018-11-29 20:37:02 -05:00
end