1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_dispatch
Piotr Sarnacki ec5d846ac6 Properly reload routes defined in class definition
Sometimes it's easier to define routes inside Engine or
Application class definition (e.g. one file applications). The
problem with such case is that if there is a plugin that
has config/routes.rb file, it will trigger routes reload on application.
Since routes definition for application is not in config/routes.rb
file routes_reloader will fail to reload application's routes
properly. With this commit you can pass routes definition as a block
to routes method, which will allow to properly reload it:

class MyApp::Application < Rails::Application
  routes do
    resources :users
  end
end
2010-09-30 09:47:05 +02:00
..
http dry up method checking in the request object 2010-09-29 16:09:58 -07:00
middleware no need to check for nil? 2010-09-30 08:11:34 +08:00
routing Properly reload routes defined in class definition 2010-09-30 09:47:05 +02:00
testing _ is not a valid scheme name character, \w includes it and also is redundant with \d. 2010-09-29 12:55:43 -03:00
railtie.rb First pass at Rack::Cache 2010-09-13 16:06:03 -07:00
routing.rb Removed deprecated RouteSet API, still many tests fail 2010-09-05 13:44:36 +02:00