aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-11-14 20:05:09 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-11-14 20:05:09 -0800
commitf732f9b7b822c9806cf3e07f127d0771b815500b (patch)
tree4736ab2134a91847559071e9430f7797e9b753e9 /actionpack/lib/action_view/helpers
parentbff4d8d165486797227c5933e93a62e7f2c15d98 (diff)
parentdc3ac357dc21c8ba05de95760da2b2c9f963012e (diff)
downloadrails-f732f9b7b822c9806cf3e07f127d0771b815500b.tar.gz
rails-f732f9b7b822c9806cf3e07f127d0771b815500b.tar.bz2
rails-f732f9b7b822c9806cf3e07f127d0771b815500b.zip
Merge pull request #8222 from marcandre/avoid_slash
Avoid using Integer#/, as it is redefined by the 'mathn' stdlib
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/date_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index 459f95bb73..6e51ba66a5 100644
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -129,7 +129,7 @@ module ActionView
minutes_with_offset = distance_in_minutes
end
remainder = (minutes_with_offset % 525600)
- distance_in_years = (minutes_with_offset / 525600)
+ distance_in_years = (minutes_with_offset.div 525600)
if remainder < 131400
locale.t(:about_x_years, :count => distance_in_years)
elsif remainder < 394200