Class: Bushido::Generators::RoutesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/bushido/routes_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_routes_fileObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/bushido/routes_generator.rb', line 5

def create_routes_file
  prepend_to_file("config/routes.rb") do
"begin\n  Rails.application.routes.draw do\n    bushido_routes\n  end\nrescue => e\n  puts \"Error loading the Bushido routes:\"\n  puts \"\\\#{e.inspect}\"\nend\n"
  end

end