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

15 commits

Author SHA1 Message Date
Waseem Ahmad
1a4d8736ce Require different core extensions correctly.
The begin rescue block is specifically to catch LoadError while loading
i18n gem. Other core extensions, under active support, should be
required outside of the begin rescue block.
2013-05-09 12:32:02 +05:30
Ryunosuke SATO
cfd85255d6 Supress warning about method redifinition
In i18n gem, the following methods are defined.
- `Hash#except`
- `Hash#slice`

But if there are defined already, i18n skips these definitions.
So these definition by `active_support` are required before `require 'i18n'`.
2013-02-11 02:29:24 +09:00
Ryunosuke SATO
c112721b44 Remove method redefined warning
In `i18n` gem, the method definition of  `Hash#deep_merge!` is skipped
when it is already defined.

- warning: method redefined; discarding old deep_merge!
2013-02-11 00:09:02 +09:00
Santiago Pastorino
38293ea828 require active_support/lazy_load_hooks where is needed 2012-05-22 11:33:03 -03:00
Jan Xie
a807db9d19 refactor lazy_load_hooks load position 2012-05-22 21:50:16 +08:00
Santiago Pastorino
a00228c1a3 Lazy load I18n 2012-05-11 19:00:25 -03:00
José Valim
d5646e842f Move I18n dependency back to ActiveSupport. 2011-05-22 13:31:19 +02:00
José Valim
8d8062190d I18n is always loaded on boot by Active Model or Action Pack, so no need for supporting lazy hooks. 2010-11-20 19:39:57 +01:00
Carl Lerche
9362ef6e21 Require lazy_load_hooks.rb with the correct path. 2010-09-14 10:40:05 -07:00
Jack Dempsey
a427876606 require i18n in transliterate so it can run in isolated situations 2010-09-14 10:25:33 -07:00
José Valim
dad80ad786 I18n.reload! is only called if any of the locale files actually changed. 2010-06-20 14:44:38 +02:00
Santiago Pastorino
1854209bb3 Unforce i18n from AS
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-31 12:56:25 +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
David Heinemeier Hansson
1cd949006a Fix the i18n dependency problem 2009-12-27 14:43:06 -08:00