aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2015-06-23 17:55:37 +0200
committerRobin Dupret <robin.dupret@gmail.com>2015-06-23 17:55:37 +0200
commite09129c94c382650987d1005f3e2741b60bfa0d6 (patch)
treeb0efc1acdffd34b709a3b9cf7779563c34ee544a /actionview/lib
parent707144a31e19a3d6c1cb237d4cb74cefa0124296 (diff)
downloadrails-e09129c94c382650987d1005f3e2741b60bfa0d6.tar.gz
rails-e09129c94c382650987d1005f3e2741b60bfa0d6.tar.bz2
rails-e09129c94c382650987d1005f3e2741b60bfa0d6.zip
A few documentation fixes [ci skip]
Diffstat (limited to 'actionview/lib')
-rw-r--r--actionview/lib/action_view/helpers/date_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb
index 0633213d5e..9c8edc69a9 100644
--- a/actionview/lib/action_view/helpers/date_helper.rb
+++ b/actionview/lib/action_view/helpers/date_helper.rb
@@ -69,8 +69,8 @@ module ActionView
# distance_of_time_in_words(to_time, from_time, include_seconds: true) # => about 6 years
# distance_of_time_in_words(Time.now, Time.now) # => less than a minute
#
- # With the <tt>scope</tt> you can define a custom scope for Rails lookup
- # the translation.
+ # With the <tt>scope</tt> option, you can define a custom scope for Rails
+ # to lookup the translation.
#
# For example you can define the following in your locale (e.g. en.yml).
#
@@ -78,8 +78,8 @@ module ActionView
# distance_in_words:
# short:
# about_x_hours:
- # one: 1 hr
- # other: '%{count} hr'
+ # one: 'an hour'
+ # other: '%{count} hours'
#
# See https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/en.yml
# for more examples.
@@ -87,8 +87,8 @@ module ActionView
# Which will then result in the following:
#
# from_time = Time.now
- # distance_of_time_in_words(from_time, from_time + 50.minutes, scope: 'datetime.distance_in_words.short') # => 1 hr
- # distance_of_time_in_words(from_time, from_time + 3.hours, scope: 'datetime.distance_in_words.short') # => 3 hr
+ # distance_of_time_in_words(from_time, from_time + 50.minutes, scope: 'datetime.distance_in_words.short') # => "an hour"
+ # distance_of_time_in_words(from_time, from_time + 3.hours, scope: 'datetime.distance_in_words.short') # => "3 hours"
def distance_of_time_in_words(from_time, to_time = 0, options = {})
options = {
scope: :'datetime.distance_in_words'