File tree Expand file tree Collapse file tree 7 files changed +33
-18
lines changed
actioncable/lib/action_cable/connection
activesupport/lib/active_support Expand file tree Collapse file tree 7 files changed +33
-18
lines changed Original file line number Diff line number Diff line change @@ -237,15 +237,15 @@ def started_request_message
237
237
request . filtered_path ,
238
238
websocket . possible? ? " [WebSocket]" : "[non-WebSocket]" ,
239
239
request . ip ,
240
- Time . now . to_s ]
240
+ Time . now . to_default_s ]
241
241
end
242
242
243
243
def finished_request_message
244
244
'Finished "%s"%s for %s at %s' % [
245
245
request . filtered_path ,
246
246
websocket . possible? ? " [WebSocket]" : "[non-WebSocket]" ,
247
247
request . ip ,
248
- Time . now . to_s ]
248
+ Time . now . to_default_s ]
249
249
end
250
250
251
251
def invalid_request_message
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def enqueue_at(event)
38
38
end
39
39
else
40
40
info do
41
- "Enqueued #{ job . class . name } (Job ID: #{ job . job_id } ) to #{ queue_name ( event ) } at #{ scheduled_at ( event ) } " + args_info ( job )
41
+ "Enqueued #{ job . class . name } (Job ID: #{ job . job_id } ) to #{ queue_name ( event ) } at #{ scheduled_at ( event ) . to_default_s } " + args_info ( job )
42
42
end
43
43
end
44
44
end
Original file line number Diff line number Diff line change @@ -16,9 +16,12 @@ def to_s(format = NOT_SET) # :nodoc:
16
16
end
17
17
elsif format == NOT_SET
18
18
if formatter = DATE_FORMATS [ :default ]
19
- ActiveSupport ::Deprecation . warn (
20
- "Using a :default format for Date#to_s is deprecated. Please use Date#to_fs instead."
21
- )
19
+ ActiveSupport ::Deprecation . warn ( <<-MSG . squish )
20
+ Using a :default format for Date#to_s is deprecated. Please use Date#to_fs instead. If you fixed all places
21
+ inside your application that you see this deprecation, you can set
22
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
23
+ the `Bundler.require` call to fix all the callers outside of your application.
24
+ MSG
22
25
if formatter . respond_to? ( :call )
23
26
formatter . call ( self ) . to_s
24
27
else
Original file line number Diff line number Diff line change @@ -12,9 +12,12 @@ def to_s(format = NOT_SET) # :nodoc:
12
12
formatter . respond_to? ( :call ) ? formatter . call ( self ) . to_s : strftime ( formatter )
13
13
elsif format == NOT_SET
14
14
if formatter = ::Time ::DATE_FORMATS [ :default ]
15
- ActiveSupport ::Deprecation . warn (
16
- "Using a :default format for DateTime#to_s is deprecated. Please use DateTime#to_fs instead."
17
- )
15
+ ActiveSupport ::Deprecation . warn ( <<-MSG . squish )
16
+ Using a :default format for DateTime#to_s is deprecated. Please use DateTime#to_fs instead. If you fixed all
17
+ places inside your application that you see this deprecation, you can set
18
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
19
+ the `Bundler.require` call to fix all the callers outside of your application.
20
+ MSG
18
21
if formatter . respond_to? ( :call )
19
22
formatter . call ( self ) . to_s
20
23
else
Original file line number Diff line number Diff line change @@ -11,9 +11,12 @@ def to_s(format = NOT_SET)
11
11
formatter . call ( first , last )
12
12
elsif format == NOT_SET
13
13
if formatter = RangeWithFormat ::RANGE_FORMATS [ :default ]
14
- ActiveSupport ::Deprecation . warn (
15
- "Using a :default format for Range#to_s is deprecated. Please use Range#to_fs instead."
16
- )
14
+ ActiveSupport ::Deprecation . warn ( <<-MSG . squish )
15
+ Using a :default format for Range#to_s is deprecated. Please use Range#to_fs instead. If you fixed all
16
+ places inside your application that you see this deprecation, you can set
17
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
18
+ the `Bundler.require` call to fix all the callers outside of your application.
19
+ MSG
17
20
formatter . call ( first , last )
18
21
else
19
22
super ( )
Original file line number Diff line number Diff line change @@ -12,9 +12,12 @@ def to_s(format = NOT_SET) # :nodoc:
12
12
formatter . respond_to? ( :call ) ? formatter . call ( self ) . to_s : strftime ( formatter )
13
13
elsif format == NOT_SET
14
14
if formatter = ::Time ::DATE_FORMATS [ :default ]
15
- ActiveSupport ::Deprecation . warn (
16
- "Using a :default format for Time#to_s is deprecated. Please use Time#to_fs instead."
17
- )
15
+ ActiveSupport ::Deprecation . warn ( <<-MSG . squish )
16
+ Using a :default format for Time#to_s is deprecated. Please use Time#to_fs instead. If you fixed all places
17
+ inside your application that you see this deprecation, you can set
18
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
19
+ the `Bundler.require` call to fix all the callers outside of your application.
20
+ MSG
18
21
if formatter . respond_to? ( :call )
19
22
formatter . call ( self ) . to_s
20
23
else
Original file line number Diff line number Diff line change @@ -222,9 +222,12 @@ def to_s(format = NOT_SET)
222
222
formatter . respond_to? ( :call ) ? formatter . call ( self ) . to_s : strftime ( formatter )
223
223
elsif format == NOT_SET
224
224
if formatter = ::Time ::DATE_FORMATS [ :default ]
225
- ActiveSupport ::Deprecation . warn (
226
- "Using a :default format for TimeWithZone#to_s is deprecated. Please use TimeWithZone#to_fs instead."
227
- )
225
+ ActiveSupport ::Deprecation . warn ( <<-MSG . squish )
226
+ Using a :default format for TimeWithZone#to_s is deprecated. Please use TimeWithZone#to_fs instead.
227
+ If you fixed all places inside your application that you see this deprecation, you can set
228
+ `ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION']` to `"true"` in the `config/application.rb` file before
229
+ the `Bundler.require` call to fix all the callers outside of your application.
230
+ MSG
228
231
formatter . respond_to? ( :call ) ? formatter . call ( self ) . to_s : strftime ( formatter )
229
232
else
230
233
"#{ time . strftime ( "%Y-%m-%d %H:%M:%S" ) } #{ formatted_offset ( false , 'UTC' ) } " # mimicking Ruby Time#to_s format
You can’t perform that action at this time.
0 commit comments