lib/avo/dynamic_router.rb in avo-2.26.0 vs lib/avo/dynamic_router.rb in avo-2.26.1.pr1584.pre.1

- old
+ new

@@ -1,12 +1,16 @@ module Avo class DynamicRouter def self.routes Avo::Engine.routes.draw do scope "resources", as: "resources" do - Avo::App.eager_load(:resources) unless Rails.application.config.eager_load + # Check if the user chose to manually register the resource files. + # If so, eager_load the resources dir. + if Avo.configuration.resources.nil? + Avo::App.eager_load(:resources) unless Rails.application.config.eager_load + end - BaseResource.descendants + Avo::App.fetch_resources .select do |resource| resource != :BaseResource end .select do |resource| resource.is_a? Class