Class: Hist::RoutesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hist::RoutesGenerator
- Defined in:
- lib/generators/hist/routes_generator.rb
Instance Method Summary collapse
-
#inject_hist_routes ⇒ Object
Add auditsdb to the routes.
Instance Method Details
#inject_hist_routes ⇒ Object
Add auditsdb to the routes
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/hist/routes_generator.rb', line 14 def inject_hist_routes unless IO.read("config/routes.rb").include?('Hist::Engine') marker = 'Rails.application.routes.draw do' insert_into_file "config/routes.rb", :after => marker do %q{ # routes for Hist mount Hist::Engine => '/hist' } end end end |