Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
12345678910111213141516171819202122232425# All Administrate controllers inherit from this `Admin::ApplicationController`,# making it the ideal place to put authentication logic or other# before_actions.## If you want to add pagination or other controller-level concerns,# you're free to overwrite the RESTful controller actions.module Admin class ApplicationController < Administrate::ApplicationController before_action :authenticate_admin
def authenticate_admin return if request.host_with_port == 'localhost:3000' return if current_user.present? && current_user.admin?
redirect_to root_path end
# Override this value to specify the number of elements to display at a time # on index pages. Defaults to 20. # def records_per_page # params[:per_page] || 20 # end endend