aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-02 22:46:23 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-02 22:46:23 -0300
commit6b9356a4b7d5010d65c56e688d6e7a8cece97a57 (patch)
treed2cf6e7efe80eac4a8dff348ab69165f185ce9f4 /actionview/lib
parent127d16e0be9dc79c5c07359c101a2b2dfb1c9f03 (diff)
downloadrails-6b9356a4b7d5010d65c56e688d6e7a8cece97a57.tar.gz
rails-6b9356a4b7d5010d65c56e688d6e7a8cece97a57.tar.bz2
rails-6b9356a4b7d5010d65c56e688d6e7a8cece97a57.zip
Remove the deprecated include_seconds argument from distance_of_time_in_words
Pass in an :include_seconds hash option to use this feature.
Diffstat (limited to 'actionview/lib')
-rw-r--r--actionview/lib/action_view/helpers/date_helper.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb
index 8fb5eb1548..8e1aea50a9 100644
--- a/actionview/lib/action_view/helpers/date_helper.rb
+++ b/actionview/lib/action_view/helpers/date_helper.rb
@@ -64,15 +64,7 @@ module ActionView
# distance_of_time_in_words(from_time, to_time, include_seconds: true) # => about 6 years
# 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
- def distance_of_time_in_words(from_time, to_time = 0, include_seconds_or_options = {}, options = {})
- if include_seconds_or_options.is_a?(Hash)
- options = include_seconds_or_options
- else
- ActiveSupport::Deprecation.warn "distance_of_time_in_words and time_ago_in_words now accept :include_seconds " +
- "as a part of options hash, not a boolean argument"
- options[:include_seconds] ||= !!include_seconds_or_options
- end
-
+ def distance_of_time_in_words(from_time, to_time = 0, options = {})
options = {
scope: :'datetime.distance_in_words'
}.merge!(options)