aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-07-24 21:23:23 +0200
committerXavier Noria <fxn@hashref.com>2016-07-24 21:23:23 +0200
commit5a83f054244288032a7c41c13c870674e61b14ae (patch)
tree2c8a54524901499b140c28d6e6abe1a85d7b6e76 /activemodel/lib/active_model/type
parent56527bb737eb5e1d5531cafe99ce91d025565ead (diff)
downloadrails-5a83f054244288032a7c41c13c870674e61b14ae.tar.gz
rails-5a83f054244288032a7c41c13c870674e61b14ae.tar.bz2
rails-5a83f054244288032a7c41c13c870674e61b14ae.zip
systematic revision of =~ usage in AMo
Diffstat (limited to 'activemodel/lib/active_model/type')
-rw-r--r--activemodel/lib/active_model/type/time.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/type/time.rb b/activemodel/lib/active_model/type/time.rb
index 34e09f0aba..08d127d187 100644
--- a/activemodel/lib/active_model/type/time.rb
+++ b/activemodel/lib/active_model/type/time.rb
@@ -29,7 +29,7 @@ module ActiveModel
return value unless value.is_a?(::String)
return if value.empty?
- if value =~ /^2000-01-01/
+ if value.start_with?('2000-01-01')
dummy_time_value = value
else
dummy_time_value = "2000-01-01 #{value}"