mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Story#105855968 - Shorter code on pricelist type calculation
This commit is contained in:
parent
89292bea53
commit
e2cb9e99c4
1 changed files with 1 additions and 7 deletions
|
@ -549,13 +549,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