diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-17 12:58:32 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-17 13:55:42 -0200 |
commit | b6a68737fb7f16fabff3a231e97adf42727e239a (patch) | |
tree | 5619da4f08e6bdddde59fafb3bf796e478b1a870 | |
parent | ee9412839b8e4f30103519c20001a12582b824b8 (diff) | |
download | rails-b6a68737fb7f16fabff3a231e97adf42727e239a.tar.gz rails-b6a68737fb7f16fabff3a231e97adf42727e239a.tar.bz2 rails-b6a68737fb7f16fabff3a231e97adf42727e239a.zip |
Remove return guard
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | 3 | ||||
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb index 806dc5b1d2..427c61079a 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -64,8 +64,7 @@ module ActiveRecord private def round_usec(value) - return unless value - value.change(:usec => 0) + value.change(usec: 0) if value end end end diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 40f1dbccde..a6a7b2d528 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -121,7 +121,6 @@ class DirtyTest < ActiveRecord::TestCase end def test_time_attributes_changes_without_time_zone - target = Class.new(ActiveRecord::Base) target.table_name = 'pirates' |