mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Merge pull request #7873 from steveklabnik/update_initializer"
This reverts commit43e14f8ff2
, reversing changes made tobb17a0f085
. Conflicts: railties/lib/rails/generators/rails/app/templates/config/application.rb railties/lib/rails/generators/rails/app/templates/config/initializers/locale.rb Reason: setting the Time.zone in an after_initialize block can become a problem for people upgrading, since it's not going to be available when config/initializers run, and people might be relying on it. An example that I noticed was with the Chronic gem, for date/time parsing. It requires us to configure the time class to be Time.zone, and doing that in an initializer no longer worked with these changes, so reverting is the safer path for now.
This commit is contained in:
parent
b45c63b8c0
commit
6fcdcfe1e5
2 changed files with 8 additions and 9 deletions
|
@ -22,6 +22,14 @@ module <%= app_const_base %>
|
||||||
|
|
||||||
# Custom directories with classes and modules you want to be autoloadable.
|
# Custom directories with classes and modules you want to be autoloadable.
|
||||||
# config.autoload_paths += %W(#{config.root}/extras)
|
# config.autoload_paths += %W(#{config.root}/extras)
|
||||||
|
|
||||||
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||||
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||||
|
# config.time_zone = 'Central Time (US & Canada)'
|
||||||
|
|
||||||
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||||
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||||
|
# config.i18n.default_locale = :de
|
||||||
<% if options.skip_sprockets? -%>
|
<% if options.skip_sprockets? -%>
|
||||||
|
|
||||||
# Disable the asset pipeline.
|
# Disable the asset pipeline.
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
|
|
||||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
||||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
||||||
# Rails.application.config.time_zone = 'Central Time (US & Canada)'
|
|
||||||
|
|
||||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
||||||
# Rails.application.config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
||||||
# Rails.application.config.i18n.default_locale = :de
|
|
Loading…
Reference in a new issue