Can anyone give me some insight as to why the ActiveSupport::CoreExtensions::Float::Time method ''years'' is being deprecated? I have an application managing contracts and being able to manipulate and report on them based on the number of years the contract lasts, is very convenient. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 20 Feb 2009, at 11:18, Rob Nichols wrote:> > Can anyone give me some insight as to why the > ActiveSupport::CoreExtensions::Float::Time method ''years'' is being > deprecated? I have an application managing contracts and being able to > manipulate and report on them based on the number of years the > contract > lasts, is very convenient.It''s to do with http://groups.google.com/group/rubyonrails-core/browse_thread/thread/e546c5a2c3d82da5/8556c83c1d028eff These methods used to be on Numeric, but did weird things with floats, so they were pulled out of Numeric and now only exist (in actual form) on Integer. Fred> > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
fractional years are no longer respected. convert to integers and use this instead: ActiveSupport::CoreExtensions::Integer::Time --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> It''s to do with > http://groups.google.com/group/rubyonrails-core/browse_thread/thread/e546c5a2c3d82da5/8556c83c1d028eff > > These methods used to be on Numeric, but did weird things with floats, > so they were pulled out of Numeric and now only exist (in actual form) > on Integer.Thank you - just the information I was looking for. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---