8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/generators/report/install_generator.rb', line 8
def report_initializer_file
filePath = File.expand_path(File.dirname(File.dirname(__FILE__)))
currPath = File.expand_path("../../", filePath)
FileUtils.cp_r "#{currPath}/db/migrate", "db/"
FileUtils.cp_r "#{currPath}/app/controllers", "app/"
FileUtils.cp_r "#{currPath}/app/models", "app/"
FileUtils.cp_r "#{currPath}/app/views", "app/"
FileUtils.cp_r "#{currPath}/app/views", "app/"
FileUtils.cp_r "#{currPath}/public/report", "public/"
puts "完成report模块构建"
route("resources :connects")
route("resources :dictionaries")
route("resources :reports do resources :series and resources :requirements end")
puts "report routes created!"
end
|