Class: ActiveTracker::Router

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

Class Method Summary collapse

Class Method Details

.loadObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/active_tracker/router.rb', line 3

def self.load
  Rails.application.routes.draw do
    namespace ActiveTracker::Configuration.mountpoint, as: "active_tracker", module: "active_tracker" do
      root 'dashboard#index'

      ActiveTracker::Configuration.plugins.each do |plugin|
        resources plugin.resources_name
      end
    end
  end
  Rails.application.routes.instance_variable_set(:@url_helpers, nil)
end