Sha256: d5d6ab8dab3c86225d96894193e397cc28dbb1480b6339adb0d8584b5bea1b09
Contents?: true
Size: 505 Bytes
Versions: 27
Compression:
Stored size: 505 Bytes
Contents
module Avo module DynamicRouter def self.routes(router) Rails.application.eager_load! unless Rails.env.production? BaseResource.descendants .select do |resource| resource != :BaseResource end .select do |resource| resource.is_a? Class end # .select do |resource| # resource.model_class.present? # end .map do |resource| router.resources resource.new.model_key end end end end
Version data entries
27 entries across 27 versions & 1 rubygems