Sha256: 5a86668f20427098cef709f80406a3e130759405edf98363de12fc1a4d5a44a9
Contents?: true
Size: 898 Bytes
Versions: 10
Compression:
Stored size: 898 Bytes
Contents
# frozen_string_literal: true require_dependency 'stenographer/application_controller' module Stenographer class Admin::AuthenticationsController < ApplicationController before_action :assign_authentication, only: %i[show destroy] def index @slack_authentication = Authentication.find_by(provider: 'slack') page = params[:page] || 1 @authentications = Authentication.order(id: :desc).paginate(page: page, per_page: Stenographer.per_page) end def show; end def destroy if @authentication.destroy redirect_to admin_authentications_path, notice: 'Authentication Destroyed' else redirect_to admin_authentication_path(@authentication), alert: @authentication.errors.full_messages.to_sentence end end private def assign_authentication @authentication = Authentication.find(params[:id]) end end end
Version data entries
10 entries across 10 versions & 1 rubygems