Sha256: c8b1fd4b2080b825ba77148bc4b605a8966d9a18de70d7d6ce6286b287463420
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
require 'rails/generators' module Hist class RoutesGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) desc """ This generator makes the following changes to your application: 1. Injects route declarations into your routes.rb """ # Add auditsdb to the routes 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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hist-0.2.0 | lib/generators/hist/routes_generator.rb |