Class: ActiveAdmin::Router

Inherits:
Object
  • Object
show all
Defined in:
lib/active_admin/router.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(router:, namespaces:) ⇒ Router

Returns a new instance of Router.



7
8
9
10
# File 'lib/active_admin/router.rb', line 7

def initialize(router:, namespaces:)
  @router = router
  @namespaces = namespaces
end

Instance Attribute Details

#namespacesObject (readonly)

Returns the value of attribute namespaces.



5
6
7
# File 'lib/active_admin/router.rb', line 5

def namespaces
  @namespaces
end

#routerObject (readonly)

Returns the value of attribute router.



5
6
7
# File 'lib/active_admin/router.rb', line 5

def router
  @router
end

Instance Method Details

#applyObject



12
13
14
15
# File 'lib/active_admin/router.rb', line 12

def apply
  define_root_routes
  define_resources_routes
end