Class: Admin::AuthenticationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/stenographer/admin/authentications_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject

[View source]

18
19
20
21
22
23
24
# File 'app/controllers/stenographer/admin/authentications_controller.rb', line 18

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

#indexObject

[View source]

9
10
11
12
13
14
# File 'app/controllers/stenographer/admin/authentications_controller.rb', line 9

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

#showObject

[View source]

16
# File 'app/controllers/stenographer/admin/authentications_controller.rb', line 16

def show; end