railties 5.0.0.rc1 → 5.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rails/application/configuration.rb +2 -1
- data/lib/rails/application/finisher.rb +1 -1
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/app_base.rb +1 -1
- data/lib/rails/generators/named_base.rb +4 -0
- data/lib/rails/generators/rails/app/app_generator.rb +11 -28
- data/lib/rails/generators/rails/app/templates/app/channels/application_cable/channel.rb +0 -1
- data/lib/rails/generators/rails/app/templates/app/channels/application_cable/connection.rb +0 -1
- data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +0 -2
- data/lib/rails/generators/rails/app/templates/config/cable.yml +4 -5
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +3 -0
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +2 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt +34 -0
- data/lib/rails/generators/rails/controller/controller_generator.rb +1 -2
- data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb +5 -5
- data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +3 -3
- data/lib/rails/tasks/framework.rake +1 -1
- metadata +10 -15
- data/lib/rails/generators/rails/app/templates/config/initializers/active_record_belongs_to_required_by_default.rb +0 -6
- data/lib/rails/generators/rails/app/templates/config/initializers/callback_terminator.rb +0 -6
- data/lib/rails/generators/rails/app/templates/config/initializers/per_form_csrf_tokens.rb +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/request_forgery_protection.rb +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/ssl_options.rb +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 006c4d192d3a3afcfceb4913859aeba927a5bc97
|
4
|
+
data.tar.gz: fd4981eb8966d0a352dc747606dfb5c183fcf91d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a29c4b00bd1bf12bf4d99037c8b91496de00580ef966ac350e92755db15d8819dbd13bf1a6e5c99ce1327f64fbfd566d6cf73555ae2f5ebcf4147f125335f69
|
7
|
+
data.tar.gz: 45af9be23528c503ecc2cf2d2b90b102de3d158cd9b3e12f80fbd6a778391427a1c974666c5202373102034ae4c1cf7615cb52b0359a3f129ea6391e42ca3469
|
data/CHANGELOG.md
CHANGED
@@ -16,7 +16,7 @@ module Rails
|
|
16
16
|
:railties_order, :relative_url_root, :secret_key_base, :secret_token,
|
17
17
|
:ssl_options, :public_file_server,
|
18
18
|
:session_options, :time_zone, :reload_classes_only_on_change,
|
19
|
-
:beginning_of_week, :filter_redirect, :x
|
19
|
+
:beginning_of_week, :filter_redirect, :x, :enable_dependency_loading
|
20
20
|
|
21
21
|
attr_writer :log_level
|
22
22
|
attr_reader :encoding, :api_only, :static_cache_control
|
@@ -54,6 +54,7 @@ module Rails
|
|
54
54
|
@api_only = false
|
55
55
|
@debug_exception_response_format = nil
|
56
56
|
@x = Custom.new
|
57
|
+
@enable_dependency_loading = false
|
57
58
|
end
|
58
59
|
|
59
60
|
def static_cache_control=(value)
|
@@ -173,7 +173,7 @@ module Rails
|
|
173
173
|
|
174
174
|
# Disable dependency loading during request cycle
|
175
175
|
initializer :disable_dependency_loading do
|
176
|
-
if config.eager_load && config.cache_classes
|
176
|
+
if config.eager_load && config.cache_classes && !config.enable_dependency_loading
|
177
177
|
ActiveSupport::Dependencies.unhook!
|
178
178
|
end
|
179
179
|
end
|
data/lib/rails/gem_version.rb
CHANGED
@@ -308,7 +308,7 @@ module Rails
|
|
308
308
|
|
309
309
|
def jbuilder_gemfile_entry
|
310
310
|
comment = 'Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder'
|
311
|
-
GemfileEntry.new 'jbuilder', '~> 2.
|
311
|
+
GemfileEntry.new 'jbuilder', '~> 2.5', comment, {}, options[:api]
|
312
312
|
end
|
313
313
|
|
314
314
|
def coffee_gemfile_entry
|
@@ -90,41 +90,21 @@ module Rails
|
|
90
90
|
|
91
91
|
def config_when_updating
|
92
92
|
cookie_serializer_config_exist = File.exist?('config/initializers/cookies_serializer.rb')
|
93
|
-
callback_terminator_config_exist = File.exist?('config/initializers/callback_terminator.rb')
|
94
|
-
active_record_belongs_to_required_by_default_config_exist = File.exist?('config/initializers/active_record_belongs_to_required_by_default.rb')
|
95
|
-
to_time_preserves_timezone_config_exist = File.exist?('config/initializers/to_time_preserves_timezone.rb')
|
96
93
|
action_cable_config_exist = File.exist?('config/cable.yml')
|
97
|
-
ssl_options_exist = File.exist?('config/initializers/ssl_options.rb')
|
98
94
|
rack_cors_config_exist = File.exist?('config/initializers/cors.rb')
|
99
95
|
|
100
96
|
config
|
101
97
|
|
102
98
|
gsub_file 'config/environments/development.rb', /^(\s+)config\.file_watcher/, '\1# config.file_watcher'
|
103
99
|
|
104
|
-
unless callback_terminator_config_exist
|
105
|
-
remove_file 'config/initializers/callback_terminator.rb'
|
106
|
-
end
|
107
|
-
|
108
100
|
unless cookie_serializer_config_exist
|
109
101
|
gsub_file 'config/initializers/cookies_serializer.rb', /json(?!,)/, 'marshal'
|
110
102
|
end
|
111
103
|
|
112
|
-
unless active_record_belongs_to_required_by_default_config_exist
|
113
|
-
remove_file 'config/initializers/active_record_belongs_to_required_by_default.rb'
|
114
|
-
end
|
115
|
-
|
116
|
-
unless to_time_preserves_timezone_config_exist
|
117
|
-
remove_file 'config/initializers/to_time_preserves_timezone.rb'
|
118
|
-
end
|
119
|
-
|
120
104
|
unless action_cable_config_exist
|
121
105
|
template 'config/cable.yml'
|
122
106
|
end
|
123
107
|
|
124
|
-
unless ssl_options_exist
|
125
|
-
remove_file 'config/initializers/ssl_options.rb'
|
126
|
-
end
|
127
|
-
|
128
108
|
unless rack_cors_config_exist
|
129
109
|
remove_file 'config/initializers/cors.rb'
|
130
110
|
end
|
@@ -305,6 +285,17 @@ module Rails
|
|
305
285
|
end
|
306
286
|
end
|
307
287
|
|
288
|
+
def delete_public_files_if_api_option
|
289
|
+
if options[:api]
|
290
|
+
remove_file 'public/404.html'
|
291
|
+
remove_file 'public/422.html'
|
292
|
+
remove_file 'public/500.html'
|
293
|
+
remove_file 'public/apple-touch-icon-precomposed.png'
|
294
|
+
remove_file 'public/apple-touch-icon.png'
|
295
|
+
remove_file 'public/favicon.ico'
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
308
299
|
def delete_js_folder_skipping_javascript
|
309
300
|
if options[:skip_javascript]
|
310
301
|
remove_dir 'app/assets/javascripts'
|
@@ -331,12 +322,6 @@ module Rails
|
|
331
322
|
end
|
332
323
|
end
|
333
324
|
|
334
|
-
def delete_active_record_initializers_skipping_active_record
|
335
|
-
if options[:skip_active_record]
|
336
|
-
remove_file 'config/initializers/active_record_belongs_to_required_by_default.rb'
|
337
|
-
end
|
338
|
-
end
|
339
|
-
|
340
325
|
def delete_action_cable_files_skipping_action_cable
|
341
326
|
if options[:skip_action_cable]
|
342
327
|
remove_file 'config/cable.yml'
|
@@ -349,8 +334,6 @@ module Rails
|
|
349
334
|
if options[:api]
|
350
335
|
remove_file 'config/initializers/session_store.rb'
|
351
336
|
remove_file 'config/initializers/cookies_serializer.rb'
|
352
|
-
remove_file 'config/initializers/request_forgery_protection.rb'
|
353
|
-
remove_file 'config/initializers/per_form_csrf_tokens.rb'
|
354
337
|
end
|
355
338
|
end
|
356
339
|
|
@@ -1,7 +1,5 @@
|
|
1
1
|
class ApplicationController < ActionController::<%= options[:api] ? "API" : "Base" %>
|
2
2
|
<%- unless options[:api] -%>
|
3
|
-
# Prevent CSRF attacks by raising an exception.
|
4
|
-
# For APIs, you may want to use :null_session instead.
|
5
3
|
protect_from_forgery with: :exception
|
6
4
|
<%- end -%>
|
7
5
|
end
|
@@ -1,10 +1,9 @@
|
|
1
|
-
# Action Cable uses Redis by default to administer connections, channels, and sending/receiving messages over the WebSocket.
|
2
|
-
production:
|
3
|
-
adapter: redis
|
4
|
-
url: redis://localhost:6379/1
|
5
|
-
|
6
1
|
development:
|
7
2
|
adapter: async
|
8
3
|
|
9
4
|
test:
|
10
5
|
adapter: async
|
6
|
+
|
7
|
+
production:
|
8
|
+
adapter: redis
|
9
|
+
url: redis://localhost:6379/1
|
@@ -46,6 +46,9 @@ Rails.application.configure do
|
|
46
46
|
# This option may cause significant delays in view rendering with a large
|
47
47
|
# number of complex assets.
|
48
48
|
config.assets.debug = true
|
49
|
+
|
50
|
+
# Suppress logger output for asset requests.
|
51
|
+
config.assets.quiet = true
|
49
52
|
<%- end -%>
|
50
53
|
|
51
54
|
# Raises error for missing translations
|
@@ -37,12 +37,10 @@ Rails.application.configure do
|
|
37
37
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
38
38
|
|
39
39
|
<%- unless options[:skip_action_cable] -%>
|
40
|
-
# Action Cable
|
40
|
+
# Mount Action Cable outside main process or domain
|
41
|
+
# config.action_cable.mount_path = nil
|
41
42
|
# config.action_cable.url = 'wss://example.com/cable'
|
42
43
|
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
43
|
-
|
44
|
-
# Don't mount Action Cable in the main server process.
|
45
|
-
# config.action_cable.mount_path = nil
|
46
44
|
<%- end -%>
|
47
45
|
|
48
46
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains migration options to ease your Rails 5.0 upgrade.
|
4
|
+
#
|
5
|
+
<%- if options[:update] -%>
|
6
|
+
# Once upgraded flip defaults one by one to migrate to the new default.
|
7
|
+
#
|
8
|
+
<%- end -%>
|
9
|
+
# Read the Rails 5.0 release notes for more info on each option.
|
10
|
+
<%- unless options[:api] -%>
|
11
|
+
|
12
|
+
# Enable per-form CSRF tokens. Previous versions had false.
|
13
|
+
Rails.application.config.action_controller.per_form_csrf_tokens = <%= options[:update] ? false : true %>
|
14
|
+
|
15
|
+
# Enable origin-checking CSRF mitigation. Previous versions had false.
|
16
|
+
Rails.application.config.action_controller.forgery_protection_origin_check = <%= options[:update] ? false : true %>
|
17
|
+
<%- end -%>
|
18
|
+
|
19
|
+
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
|
20
|
+
# Previous versions had false.
|
21
|
+
ActiveSupport.to_time_preserves_timezone = <%= options[:update] ? false : true %>
|
22
|
+
<%- unless options[:skip_active_record] -%>
|
23
|
+
|
24
|
+
# Require `belongs_to` associations by default. Previous versions had false.
|
25
|
+
Rails.application.config.active_record.belongs_to_required_by_default = <%= options[:update] ? false : true %>
|
26
|
+
<%- end -%>
|
27
|
+
|
28
|
+
# Do not halt callback chains when a callback returns false. Previous versions had true.
|
29
|
+
ActiveSupport.halt_callback_chains_on_return_false = <%= options[:update] ? true : false %>
|
30
|
+
<%- unless options[:update] -%>
|
31
|
+
|
32
|
+
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
|
33
|
+
Rails.application.config.ssl_options = { hsts: { subdomains: true } }
|
34
|
+
<%- end -%>
|
@@ -11,31 +11,31 @@ class <%= controller_class_name %>ControllerTest < ActionDispatch::IntegrationTe
|
|
11
11
|
end
|
12
12
|
|
13
13
|
test "should get index" do
|
14
|
-
get <%= index_helper %>_url
|
14
|
+
get <%= index_helper %>_url, as: :json
|
15
15
|
assert_response :success
|
16
16
|
end
|
17
17
|
|
18
18
|
test "should create <%= singular_table_name %>" do
|
19
19
|
assert_difference('<%= class_name %>.count') do
|
20
|
-
post <%= index_helper %>_url, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }
|
20
|
+
post <%= index_helper %>_url, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }, as: :json
|
21
21
|
end
|
22
22
|
|
23
23
|
assert_response 201
|
24
24
|
end
|
25
25
|
|
26
26
|
test "should show <%= singular_table_name %>" do
|
27
|
-
get <%= show_helper
|
27
|
+
get <%= show_helper %>, as: :json
|
28
28
|
assert_response :success
|
29
29
|
end
|
30
30
|
|
31
31
|
test "should update <%= singular_table_name %>" do
|
32
|
-
patch <%= show_helper %>, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }
|
32
|
+
patch <%= show_helper %>, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }, as: :json
|
33
33
|
assert_response 200
|
34
34
|
end
|
35
35
|
|
36
36
|
test "should destroy <%= singular_table_name %>" do
|
37
37
|
assert_difference('<%= class_name %>.count', -1) do
|
38
|
-
delete <%= show_helper
|
38
|
+
delete <%= show_helper %>, as: :json
|
39
39
|
end
|
40
40
|
|
41
41
|
assert_response 204
|
@@ -25,7 +25,7 @@ class <%= controller_class_name %>ControllerTest < ActionDispatch::IntegrationTe
|
|
25
25
|
post <%= index_helper %>_url, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }
|
26
26
|
end
|
27
27
|
|
28
|
-
assert_redirected_to <%= singular_table_name %>
|
28
|
+
assert_redirected_to <%= singular_table_name %>_url(<%= class_name %>.last)
|
29
29
|
end
|
30
30
|
|
31
31
|
test "should show <%= singular_table_name %>" do
|
@@ -40,7 +40,7 @@ class <%= controller_class_name %>ControllerTest < ActionDispatch::IntegrationTe
|
|
40
40
|
|
41
41
|
test "should update <%= singular_table_name %>" do
|
42
42
|
patch <%= show_helper %>, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }
|
43
|
-
assert_redirected_to <%= singular_table_name %>
|
43
|
+
assert_redirected_to <%= singular_table_name %>_url(<%= "@#{singular_table_name}" %>)
|
44
44
|
end
|
45
45
|
|
46
46
|
test "should destroy <%= singular_table_name %>" do
|
@@ -48,7 +48,7 @@ class <%= controller_class_name %>ControllerTest < ActionDispatch::IntegrationTe
|
|
48
48
|
delete <%= show_helper %>
|
49
49
|
end
|
50
50
|
|
51
|
-
assert_redirected_to <%= index_helper %>
|
51
|
+
assert_redirected_to <%= index_helper %>_url
|
52
52
|
end
|
53
53
|
end
|
54
54
|
<% end -%>
|
@@ -48,7 +48,7 @@ namespace :app do
|
|
48
48
|
require 'rails/generators'
|
49
49
|
require 'rails/generators/rails/app/app_generator'
|
50
50
|
gen = Rails::Generators::AppGenerator.new ["rails"],
|
51
|
-
{ api: !!Rails.application.config.api_only },
|
51
|
+
{ api: !!Rails.application.config.api_only, update: true },
|
52
52
|
destination_root: Rails.root
|
53
53
|
File.exist?(Rails.root.join("config", "application.rb")) ?
|
54
54
|
gen.send(:app_const) : gen.send(:valid_const?)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0.
|
4
|
+
version: 5.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.0.
|
19
|
+
version: 5.0.0.rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.0.
|
26
|
+
version: 5.0.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actionpack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.0.0.
|
33
|
+
version: 5.0.0.rc2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.0.0.
|
40
|
+
version: 5.0.0.rc2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +92,14 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 5.0.0.
|
95
|
+
version: 5.0.0.rc2
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 5.0.0.
|
102
|
+
version: 5.0.0.rc2
|
103
103
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
104
104
|
email: david@loudthinking.com
|
105
105
|
executables:
|
@@ -220,21 +220,16 @@ files:
|
|
220
220
|
- lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
|
221
221
|
- lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
|
222
222
|
- lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
|
223
|
-
- lib/rails/generators/rails/app/templates/config/initializers/active_record_belongs_to_required_by_default.rb
|
224
223
|
- lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb
|
225
224
|
- lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt
|
226
225
|
- lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb
|
227
|
-
- lib/rails/generators/rails/app/templates/config/initializers/callback_terminator.rb
|
228
226
|
- lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb
|
229
227
|
- lib/rails/generators/rails/app/templates/config/initializers/cors.rb
|
230
228
|
- lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb
|
231
229
|
- lib/rails/generators/rails/app/templates/config/initializers/inflections.rb
|
232
230
|
- lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb
|
233
|
-
- lib/rails/generators/rails/app/templates/config/initializers/
|
234
|
-
- lib/rails/generators/rails/app/templates/config/initializers/request_forgery_protection.rb
|
231
|
+
- lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt
|
235
232
|
- lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt
|
236
|
-
- lib/rails/generators/rails/app/templates/config/initializers/ssl_options.rb
|
237
|
-
- lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb
|
238
233
|
- lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
|
239
234
|
- lib/rails/generators/rails/app/templates/config/locales/en.yml
|
240
235
|
- lib/rails/generators/rails/app/templates/config/puma.rb
|
@@ -407,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
407
402
|
version: 1.3.1
|
408
403
|
requirements: []
|
409
404
|
rubyforge_project:
|
410
|
-
rubygems_version: 2.
|
405
|
+
rubygems_version: 2.6.4
|
411
406
|
signing_key:
|
412
407
|
specification_version: 4
|
413
408
|
summary: Tools for creating, working with, and running Rails applications.
|
@@ -1,6 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Require `belongs_to` associations by default. This is a new Rails 5.0
|
4
|
-
# default, so it is introduced as a configuration option to ensure that apps
|
5
|
-
# made on earlier versions of Rails are not affected when upgrading.
|
6
|
-
Rails.application.config.active_record.belongs_to_required_by_default = true
|
@@ -1,6 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Do not halt callback chains when a callback returns false. This is a new
|
4
|
-
# Rails 5.0 default, so it is introduced as a configuration option to ensure
|
5
|
-
# that apps made with earlier versions of Rails are not affected when upgrading.
|
6
|
-
ActiveSupport.halt_callback_chains_on_return_false = false
|
data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Preserve the timezone of the receiver when calling to `to_time`.
|
4
|
-
# Ruby 2.4 will change the behavior of `to_time` to preserve the timezone
|
5
|
-
# when converting to an instance of `Time` instead of the previous behavior
|
6
|
-
# of converting to the local system timezone.
|
7
|
-
#
|
8
|
-
# Rails 5.0 introduced this config option so that apps made with earlier
|
9
|
-
# versions of Rails are not affected when upgrading.
|
10
|
-
ActiveSupport.to_time_preserves_timezone = true
|