Skip to content

Commit ccb4e70

Browse files
committed
Fix deprecation message in to_time_preserves_timezone
And silence the deprecation in the railties test suite.
1 parent 3278a40 commit ccb4e70

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

activesupport/lib/active_support.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def self.to_time_preserves_timezone
117117
def self.to_time_preserves_timezone=(value)
118118
if !value
119119
ActiveSupport.deprecator.warn(
120-
"`to_time` will always preserve the receiver timezone rather than system local time in Rails 8.0." \
120+
"`to_time` will always preserve the receiver timezone rather than system local time in Rails 8.0. " \
121121
"To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`."
122122
)
123123
elsif value != :zone

railties/test/application/configuration_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4619,8 +4619,8 @@ def view_test
46194619

46204620
add_to_config <<-RUBY
46214621
routes.prepend do
4622-
get "foo/controller", to: "foo#controller_test"
4623-
get "foo/view", to: "foo#view_test"
4622+
get "foo/controller" => "foo#controller_test"
4623+
get "foo/view" => "foo#view_test"
46244624
end
46254625
RUBY
46264626

railties/test/isolation/abstract_unit.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ def self.name; "RailtiesTestApp"; end
265265
@app.config.active_support.deprecation = :log
266266
@app.config.log_level = :error
267267
@app.config.secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
268+
@app.config.active_support.to_time_preserves_timezone = :zone
268269

269270
yield @app if block_given?
270271
@app.initialize!

0 commit comments

Comments
 (0)