Where is the best place to add a method to the integer class in Rails? I\'d like to add a to_meters and to_miles methods.
to_meters
to_miles
Why not just:
class Feet def self.in_miles(feet) feet/5280 end end
usage:
Feet.in_miles 2313
Or maybe look at it the other way:
class Miles def self.from_feet(feet) feet/5280 end end Miles.from_feet 2313