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/staff/telegram_bots_controller.rb
2018-12-13 12:01:06 +05:00

25 lines
526 B
Ruby

# frozen_string_literal: true
class Staff::TelegramBotsController < ApplicationController
before_action :set_telegram_bot, except: :index
# GET /staff/telegram_bots
def index
authorize %i[staff telegram_bot]
@telegram_bots = policy_scope(
TelegramBot,
policy_scope_class: Staff::TelegramBotPolicy::Scope,
)
end
# GET /staff/telegram_bots/:id
def show
authorize [:staff, @telegram_bot]
end
private
def set_telegram_bot
@telegram_bot = TelegramBot.find params[:id]
end
end