require_dependency "bot_mob/rails/application_controller" module BotMob module Rails class AuthenticationController < ApplicationController def index BotMob.roster.authority.process(bot) redirect_to setup_path, notice: 'Thanks for installing!' end private def authority @authority ||= BotMob::Authority.new(network, params[:code]) end def network params[:network].to_s.to_sym end end end end