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

22 commits

Author SHA1 Message Date
robertomiranda
ce8efcf296 Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
2015-01-31 23:12:41 -05:00
claudiob
d217daf6a7 Deprecate false as the way to halt AS callbacks
After this commit, returning `false` in a callback will display a deprecation
warning to make developers aware of the fact that they need to explicitly
`throw(:abort)` if their intention is to halt a callback chain.

This commit also patches two internal uses of AS::Callbacks (inside
ActiveRecord and ActionDispatch) which sometimes return `false` but whose
returned value is not meaningful for the purpose of execution.

In both cases, the returned value is set to `true`, which does not affect the
execution of the callbacks but prevents unrequested deprecation warnings from
showing up.
2015-01-02 15:31:55 -08:00
Rafael Mendonça França
cd7d414e48 Do not set enforce_available_locales to i18n 0.7
Now the default is always true.

Users still can set it using config.i18n.enforce_available_locales.
2014-07-23 17:40:44 -03:00
Rafael Mendonça França
0bef6ff9af Require active_support at the railties
Railties need to be used without having to require any dependecy first.
2014-05-27 14:39:24 -03:00
deeeki
1686c9a5f6 Remove require 'active_support' from individual modules
Let users require `active_support` before loading any ActiveSupport modules
http://guides.rubyonrails.org/active_support_core_extensions.html
2014-05-27 12:48:33 +09:00
Carlos Antonio da Silva
b9c9766cd4 Fix typo [ci skip] 2013-12-21 15:03:32 -02:00
Carlos Antonio da Silva
c445c6d1b9 Default I18n.enforce_available_locales to true
We will default this option to true from now on to ensure users properly
handle their list of available locales whenever necessary. This option
was added as a security measure and thus Rails will follow it defaulting
to secure option.

Also improve the handling of I18n config options in its railtie, taking
the new enforce_available_locales option into account, by setting it as
the last one in the process. This ensures no other configuration will
trigger a deprecation warning due to that setting.
2013-12-17 09:05:41 -02:00
Yves Senn
73b57a515f set i18n.enforce_available_locales before i18n.default_locale. 2013-12-05 13:19:51 +01:00
Francesco Rodriguez
d71d5ba71f update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
José Valim
5ea2b11ad7 Stop relying on mutable structures in the FileUpdateChecker 2012-06-12 10:36:13 +02: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
Aaron Patterson
b907271b4b stop circular require warnings 2011-08-24 16:47:01 -07:00
Aaron Patterson
44f07098fe dealing with some -w warnings on startup 2011-08-24 13:25:11 -07:00
suchasurge
9b96de6f3d Some style changes 2011-03-06 10:26:24 +01:00
Saimon Moore
c2aca3ddd7 Ensure I18n setup is only executed once if triggered on eager loading [#6353 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 15:36:09 -02:00
Saimon Moore
b1ca339b53 Additionally trigger i18n configuration setup before any eager loading [#6353 state:resolved]
This handles the case where config.cache_classes is true and classes
are loaded before the I18n load path has had a chance to be populated.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 15:35:48 -02:00
John Firebaugh
435bccda93 Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
Santiago Pastorino
b451de0d6d Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
José Valim
e596a8e14c Add the possibility to have several behaviors in AS::Deprecation. 2010-07-01 10:26:45 +02: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