Module: Releaf::Component

Included in:
Root, SettingsUI
Defined in:
lib/releaf/component.rb

Instance Method Summary collapse

Instance Method Details

#resource_route(router, namespace, resource) ⇒ Object


2
3
4
5
6
7
8
9
10
11
12
# File 'lib/releaf/component.rb', line 2

def resource_route(router, namespace, resource)
  router.namespace :releaf, path: nil do
    if namespace
      router.namespace namespace, path: nil do
        router.releaf_resources(resource)
      end
    else
      router.releaf_resources(resource)
    end
  end
end