class Chapter07::Generators::SolutionsGenerator
Public Instance Methods
add_help_route()
click to toggle source
# File lib/generators/chapter07/solutions/solutions_generator.rb, line 10 def add_help_route dest = File.join(Rails.root,'config','routes.rb') insert_into_file(dest, :after => %r{/about.*:to.*pages#about.*$}) do "\n match '/help', :to => 'pages#help'" end end
copy_app_tree()
click to toggle source
# File lib/generators/chapter07/solutions/solutions_generator.rb, line 6 def copy_app_tree directory(self.class.source_root, Rails.root) end
remove_static_index_html_file()
click to toggle source
# File lib/generators/chapter07/solutions/solutions_generator.rb, line 18 def remove_static_index_html_file remove_file(File.join(Rails.root, 'public', 'index.html')) end