controllers.rb 307 B

123456789101112131415
  1. # frozen_string_literal: true
  2. # Dynamically pick up all of the controllers
  3. Dir.glob(
  4. File.join(
  5. File.dirname(__FILE__), 'controllers', '*.rb'
  6. )
  7. ).reject { |c| File.basename(c) == 'controllers.rb' }.each do |x|
  8. begin
  9. require x
  10. rescue StandardError
  11. puts "unable to load: #{x}"
  12. end
  13. end