aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/current_attributes_integration_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/application/current_attributes_integration_test.rb')
-rw-r--r--railties/test/application/current_attributes_integration_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/application/current_attributes_integration_test.rb b/railties/test/application/current_attributes_integration_test.rb
index 146e96facc..f4ff5b8077 100644
--- a/railties/test/application/current_attributes_integration_test.rb
+++ b/railties/test/application/current_attributes_integration_test.rb
@@ -18,7 +18,7 @@ class CurrentAttributesIntegrationTest < ActiveSupport::TestCase
def customer=(customer)
super
- Time.zone = customer.try(:time_zone)
+ Time.zone = customer&.time_zone
end
end
RUBY
@@ -53,7 +53,7 @@ class CurrentAttributesIntegrationTest < ActiveSupport::TestCase
RUBY
app_file "app/views/customers/index.html.erb", <<-RUBY
- <%= Current.customer.try(:name) || 'noone' %>,<%= Time.zone.name %>
+ <%= Current.customer&.name || 'noone' %>,<%= Time.zone.name %>
RUBY
require "#{app_path}/config/environment"