1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Robin Dupret
5ad7f8ab41 Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00
José Valim
5e7d6bba79 Revert "Allow loading external route files from the router"
This reverts commit 6acebb38bc.

Usage of this feature did not reveal any improvement in existing apps.

Conflicts:

	actionpack/lib/action_dispatch/routing/mapper.rb
	guides/source/routing.textile
	railties/lib/rails/engine.rb
	railties/lib/rails/paths.rb
	railties/test/paths_test.rb
2012-06-29 17:44:10 +02:00
Carlos Antonio da Silva
72a2edd8c3 Refactor RoutesReloader a bit to avoid creating extra hash objects 2012-04-28 12:57:39 -03:00
Yehuda Katz
363a06f351 Routes reloader knows how to reload external files 2012-04-25 22:45:56 -05:00
José Valim
0db93941a4 We should finalize the routes as soon as possible and not wait for the controller to be loaded. 2012-01-06 17:10:39 +01:00
José Valim
80256abb39 FileUpdateChecker should be able to handle deleted files. 2011-12-13 11:23:21 +01:00
José Valim
1f5b9bbdb3 Clean up FileUpdateChecker API. 2011-12-13 10:07:02 +01:00
José Valim
fa1d9a884c Speed up development by only reloading classes if dependencies files changed.
This can be turned off by setting `config.reload_classes_only_on_change` to false.

Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading.

Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
2011-12-12 22:54:04 +01:00
José Valim
5c234ab8ed Composition > inheritance. 2011-12-12 14:57:09 +01:00
Piotr Sarnacki
08f4713dba Refactored routes reloading to use RouteSet#append instead keeping block in Engine
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-08 18:23:25 +02:00
José Valim
7b0c592e38 reload_routes! is part of the public API and should not be removed. 2010-10-02 17:45:26 +02:00
Piotr Sarnacki
3049e645e5 Moved Rails::RoutesReloader to Rails::Application::RoutesReloader 2010-09-30 09:47:06 +02:00
José Valim
772c2b0b86 Use the new ActiveSupport::FileUpdateChecker instead of RoutesReloader. 2010-06-20 13:37:58 +02:00
wycats
4aded43b73 Replace the placeholder base_hook API with on_load. To specify some code that
should run during framework load do:

ActiveSupport.on_load(:action_controller) do
  # Code run in the context of AC::Base
end
2010-03-29 17:08:50 -07:00
wycats
39d6f9e112 Make many parts of Rails lazy. In order to facilitate this,
add lazy_load_hooks.rb, which allows us to declare code that
should be run at some later time. For instance, this allows
us to defer requiring ActiveRecord::Base at boot time purely
to apply configuration. Instead, we register a hook that should
apply configuration once ActiveRecord::Base is loaded.

With these changes, brings down total boot time of a
new app to 300ms in production and 400ms in dev.

TODO: rename base_hook
2010-03-07 06:24:30 -08:00
José Valim
226d8e745a Refactor MetalLoader and RoutesReloader to rely less on class configuration.
Signed-off-by: Carl Lerche <carllerche@mac.com>
2010-01-28 10:28:40 -08:00
José Valim
84ebfa4550 Ensure metals and initializers in plugins are loaded. 2010-01-24 14:48:00 +01:00
José Valim
2fde9d774b Solve some pendencies. 2010-01-24 09:32:54 +01:00
José Valim
13d66cdf25 Extract Railtie load from application. 2010-01-23 16:59:37 +01:00
José Valim
80130d1201 Extract routes reloading responsibilities from application and load them just upon a request. 2010-01-23 16:06:33 +01:00