Sha256: de4efb0b2bed4d59e1495def20afc5ae69b81923c279e276253d834cebab0852
Contents?: true
Size: 562 Bytes
Versions: 21
Compression:
Stored size: 562 Bytes
Contents
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 BaseResource.descendants .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
21 entries across 21 versions & 1 rubygems