mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Story#105855968 - Shorter code on pricelist type calculation
This commit is contained in:
parent
a218a0b5f2
commit
e8bf3f7e64
1 changed files with 1 additions and 7 deletions
|
@ -458,13 +458,7 @@ class Domain < ActiveRecord::Base
|
|||
p = period_i / 12 if unit == 'm'
|
||||
p = period_i if unit == 'y'
|
||||
|
||||
if p > 1
|
||||
p = "#{p}years"
|
||||
else
|
||||
p = "#{p}year"
|
||||
end
|
||||
|
||||
Pricelist.pricelist_for(zone, operation, p)
|
||||
Pricelist.pricelist_for(zone, operation, "#{p}year".pluralize(p))
|
||||
end
|
||||
|
||||
### VALIDATIONS ###
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue