saucy/app/controllers/application_controller.rb

15 lines
358 B
Ruby
Raw Normal View History

class ApplicationController < ActionController::Base
2022-06-25 22:45:47 +00:00
include Clearance::Controller
2022-06-26 11:57:00 +00:00
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