Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/compendium/engine/mount.rb

Instance Method Summary collapse

Instance Method Details

#mount_compendium(options = {}) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/compendium/engine/mount.rb', line 4

def mount_compendium(options = {})
  scope options[:at], controller: options.fetch(:controller, 'compendium/reports') do
    get ':report_name', action: :setup, as: 'compendium_reports_setup'
    post ':report_name(/:query)', action: :run, as: 'compendium_reports_run'
    root action: :index, as: 'compendium_reports_root'
  end
end