Module: Lesli::Routing

Defined in:
lib/lesli/routing.rb

Class Method Summary collapse

Class Method Details

.mount_dashboard_for(lesli_engine) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/lesli/routing.rb', line 36

def self.mount_dashboard_for lesli_engine

    lesli_engine::Engine.routes.draw do

        # Dashboard alias
        root to: "dashboards#show"

        # Dashboard management
        resource :dashboard, only: [:show]
        resources :dashboards do
            collection do
                post "list" => :index
                get :options
            end
            scope module: :dashboard do
                resources :components
            end
        end
    end
end