class Kapnismology::Routes

Inserts the engine (the smoketest_controller) into a given path. TODO: how to automatically do this without the user needing to insert?

Public Class Methods

insert!(path) click to toggle source
# File lib/kapnismology/engine.rb, line 20
def self.insert!(path)
  if defined?(Kapnismology) == false
    raise 'require kapnismology before trying to insert routes'
  end

  Rails.application.routes.draw do
    mount Kapnismology::Engine, at: path
  end
end