aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-09-14 11:36:12 +0200
committerGitHub <noreply@github.com>2016-09-14 11:36:12 +0200
commit0fe76197d2622674e1796a9a000995a7a1f6622b (patch)
treead2e1380ede0a1789c7c1a7bffb1f43b465c4105 /activemodel/lib
parent92703a9ea5d8b96f30e0b706b801c9185ef14f0e (diff)
parent3464cd5c288323ca115a4929d1e6b435c4afc8d4 (diff)
downloadrails-0fe76197d2622674e1796a9a000995a7a1f6622b.tar.gz
rails-0fe76197d2622674e1796a9a000995a7a1f6622b.tar.bz2
rails-0fe76197d2622674e1796a9a000995a7a1f6622b.zip
Merge pull request #26489 from kamipo/fix_broken_comments_indentation
Fix broken comments indentation caused by rubocop auto-correct [ci skip]
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/type/date_time.rb4
-rw-r--r--activemodel/lib/active_model/type/helpers/time_value.rb2
-rw-r--r--activemodel/lib/active_model/type/value.rb6
3 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/type/date_time.rb b/activemodel/lib/active_model/type/date_time.rb
index f88c9e5071..5cb0077e45 100644
--- a/activemodel/lib/active_model/type/date_time.rb
+++ b/activemodel/lib/active_model/type/date_time.rb
@@ -19,8 +19,8 @@ module ActiveModel
fast_string_to_time(value) || fallback_string_to_time(value)
end
- # '0.123456' -> 123456
- # '1.123456' -> 123456
+ # '0.123456' -> 123456
+ # '1.123456' -> 123456
def microseconds(time)
time[:sec_fraction] ? (time[:sec_fraction] * 1_000_000).to_i : 0
end
diff --git a/activemodel/lib/active_model/type/helpers/time_value.rb b/activemodel/lib/active_model/type/helpers/time_value.rb
index 64780ebbdc..d8c5d929a3 100644
--- a/activemodel/lib/active_model/type/helpers/time_value.rb
+++ b/activemodel/lib/active_model/type/helpers/time_value.rb
@@ -64,7 +64,7 @@ module ActiveModel
ISO_DATETIME = /\A(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)(\.\d+)?\z/
- # Doesn't handle time zones.
+ # Doesn't handle time zones.
def fast_string_to_time(string)
if string =~ ISO_DATETIME
microsec = ($7.to_r * 1_000_000).to_i
diff --git a/activemodel/lib/active_model/type/value.rb b/activemodel/lib/active_model/type/value.rb
index 4d3a1b29d6..7e9ae92245 100644
--- a/activemodel/lib/active_model/type/value.rb
+++ b/activemodel/lib/active_model/type/value.rb
@@ -105,9 +105,9 @@ module ActiveModel
private
- # Convenience method for types which do not need separate type casting
- # behavior for user and database inputs. Called by Value#cast for
- # values except +nil+.
+ # Convenience method for types which do not need separate type casting
+ # behavior for user and database inputs. Called by Value#cast for
+ # values except +nil+.
def cast_value(value) # :doc:
value
end