Class: ErrorPagesGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_exceptions_appObject



13
14
15
# File 'lib/generators/error_pages/error_pages_generator.rb', line 13

def add_exceptions_app
  application %Q{config.exceptions_app = self.routes} 
end

#add_routesObject



5
6
7
8
9
10
11
# File 'lib/generators/error_pages/error_pages_generator.rb', line 5

def add_routes
  route %Q{
    match '/404', :to => 'errors#not_found'
    match '/422', :to => 'errors#server_error'
    match '/500', :to => 'errors#server_error'
   }
end