saucy/app/controllers/application_controller.rb

15 lines
358 B
Ruby

class ApplicationController < ActionController::Base
include Clearance::Controller
before_action :set_paper_trail_whodunnit
before_action :initial_setup_redirect
def initial_setup_redirect
redirect_to '/initial_setup' if requires_initial_setup?
end
def requires_initial_setup?
User.count.zero? && Member.unscoped.count.zero?
end
end