Module: Releaf::Root

Extended by:
Component
Defined in:
lib/releaf/root.rb,
lib/releaf/root/configuration.rb,
lib/releaf/root/settings_manager.rb,
lib/releaf/root/default_controller_resolver.rb

Defined Under Namespace

Classes: Configuration, DefaultControllerResolver, SettingsManager

Class Method Summary collapse

Methods included from Component

resource_route

Class Method Details

.configure_componentObject


4
5
6
7
8
9
# File 'lib/releaf/root.rb', line 4

def self.configure_component
  Releaf.application.config.add_configuration(
    Releaf::Root::Configuration.new(default_controller_resolver: Releaf::Root::DefaultControllerResolver)
  )
  Releaf.application.config.settings_manager = Releaf::Root::SettingsManager
end

.draw_component_routes(router) ⇒ Object


11
12
13
14
15
16
# File 'lib/releaf/root.rb', line 11

def self.draw_component_routes(router)
  router.namespace :releaf, path: nil do
    router.root to: "root#home", as: :root
    router.post "store_settings", to: "root#store_settings"
  end
end