aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2012-11-14 16:37:28 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2012-11-14 16:49:33 -0500
commitdc3ac357dc21c8ba05de95760da2b2c9f963012e (patch)
tree29dbce8aa752513aa417d1c0842a5966844bbd20 /actionpack/lib/action_view
parent2f3d81c764a8b527299be8c33c64814431f83482 (diff)
downloadrails-dc3ac357dc21c8ba05de95760da2b2c9f963012e.tar.gz
rails-dc3ac357dc21c8ba05de95760da2b2c9f963012e.tar.bz2
rails-dc3ac357dc21c8ba05de95760da2b2c9f963012e.zip
Avoid using Integer#/, as it is redefined by the 'mathn' stdlib
Diffstat (limited to 'actionpack/lib/action_view')
-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