Class: RedmineExtensions::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/redmine_extensions/engine.rb

Class Method Summary collapse

Class Method Details

.automount!(path = nil) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/redmine_extensions/engine.rb', line 7

def self.automount!(path = nil)
  engine = self
  path ||= engine.to_s.underscore.split('/').first
  Rails.application.routes.draw do
    mount engine => path
    resources :easy_settings, only: [:edit]
  end
end