marksweston / finance

A library for financial calculations in Ruby
https://rubygems.org/gems/finance
Other
221 stars 91 forks source link

months and years methods in Integer class prevent Rails extensions from working #13

Closed jipumarino closed 12 years ago

jipumarino commented 12 years ago

In Rails this used to work:

10.months.ago

Now it just returns the current time

Regards

wkranec commented 12 years ago

Thanks for letting me know about this. Are these methods specific to Rails, or does Rails import them from another library? I've been trying to find a good gem that provides this functionality.

Anyway, I have wrapped these methods inside method_missing to avoid conflicts with those defined by Rails. The 1.1.2 release should work fine for you.