Sha256: 3447e53e95ebda46b3639dae6237c2b161ada44fa6b5a7432b3fe6453c9ff18c
Contents?: true
Size: 650 Bytes
Versions: 11
Compression:
Stored size: 650 Bytes
Contents
AdminIt::Engine.routes.draw do AdminIt.resources.each do |name, resource| resources(resource.plural, controller: "admin_it/#{name}", except: [:index]) do resource.collections.each do |context| next unless context.collection? get context.context_name, on: :collection end unless resource.collections.empty? get('/', on: :collection, action: resource.default_context) end end end unless AdminIt.resources.empty? name, resource = AdminIt.resources.first get('/', controller: "admin_it/#{name}", action: resource.default_context) end end
Version data entries
11 entries across 11 versions & 1 rubygems