Sha256: e449f7480b42c037c10af11be8ace637938d46982a6136fdb830702be512cebe
Contents?: true
Size: 750 Bytes
Versions: 66
Compression:
Stored size: 750 Bytes
Contents
module Avo class DynamicRouter def self.routes Avo::Engine.routes.draw do scope "resources", as: "resources" do # 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 Avo::App.fetch_resources .select do |resource| resource != :BaseResource end .select do |resource| resource.is_a? Class end .map do |resource| resources resource.new.route_key end end end end end end
Version data entries
66 entries across 66 versions & 1 rubygems