mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
13 lines
336 B
Ruby
13 lines
336 B
Ruby
class OmniauthAccountsController < ApplicationController
|
|
before_action :authenticate_user!
|
|
|
|
def destroy
|
|
if current_user.omniauth_users.find(params[:id]).destroy
|
|
flash[:notice] = 'The account was successfully disconnected.'
|
|
else
|
|
flash[:alert] = 'Something went wrong.'
|
|
end
|
|
redirect_to root_path
|
|
end
|
|
end
|