| Module | ActiveSupport::CoreExtensions::Float::Time |
| In: |
vendor/rails/activesupport/lib/active_support/core_ext/float/time.rb
|
# File vendor/rails/activesupport/lib/active_support/core_ext/float/time.rb, line 10
10: def months
11: ::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:months, "Fractional months are not respected. Convert value to integer before calling #months."), caller)
12: months_without_deprecation
13: end
# File vendor/rails/activesupport/lib/active_support/core_ext/float/time.rb, line 15
15: def months_without_deprecation
16: ActiveSupport::Duration.new(self * 30.days, [[:months, self]])
17: end
Deprication helper methods not available as core_ext is loaded first.
# File vendor/rails/activesupport/lib/active_support/core_ext/float/time.rb, line 6 6: def years 7: ::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:years, "Fractional years are not respected. Convert value to integer before calling #years."), caller) 8: years_without_deprecation 9: end