This commit is contained in:
Martin Lensment 2015-07-03 17:55:31 +03:00
parent 2f0666dec3
commit 9e1aabe6d3
2 changed files with 38 additions and 4 deletions

View file

@ -146,9 +146,9 @@ class Domain < ActiveRecord::Base
class << self
def convert_period_to_time(period, unit)
return period.to_i.days if unit == 'd'
return period.to_i.months if unit == 'm'
return period.to_i.years if unit == 'y'
return (period.to_i / 365).years if unit == 'd'
return (period.to_i / 12).years if unit == 'm'
return period.to_i.years if unit == 'y'
end
def included