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
2018-11-30 09:20:02 +05:00

27 lines
451 B
Ruby

# 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
end
# GET /passports/new
def new
@passport = Passport.new
authorize @passport
end
private
def set_passport
@passport = Passport.find params[:id]
end
end