Class: ErrorPagesGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_routeObject



10
11
12
# File 'lib/generators/error_pages_generator.rb', line 10

def add_route
  route "match '*path', :to => 'application#routing_error'"
end

#copy_error_pagesObject



5
6
7
8
# File 'lib/generators/error_pages_generator.rb', line 5

def copy_error_pages
  copy_file "internal_server_error.html.haml", "app/views/errors/internal_server_error.html.haml"
  copy_file "not_found.html.haml", "app/views/errors/not_found.html.haml"
end