mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Add tests #2741
This commit is contained in:
parent
2f0666dec3
commit
9e1aabe6d3
2 changed files with 38 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue