This project is archived and is in readonly mode.
Changeset [ec5d846ac6137e60d81257041e4fde82c0480b32] by Piotr Sarnacki
September 30th, 2010 @ 08:47 AM
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
http://github.com/rails/rails/commit/ec5d846ac6137e60d81257041e4fde...
Committed by Piotr Sarnacki
- M actionpack/lib/action_dispatch/routing/route_set.rb
- M railties/lib/rails/application.rb
- M railties/lib/rails/engine.rb
- M railties/test/railties/engine_test.rb
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>