mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +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 / 12 if unit == 'm'
|
||||||
p = period_i if unit == 'y'
|
p = period_i if unit == 'y'
|
||||||
|
|
||||||
if p > 1
|
Pricelist.pricelist_for(zone, operation, "#{p}year".pluralize(p))
|
||||||
p = "#{p}years"
|
|
||||||
else
|
|
||||||
p = "#{p}year"
|
|
||||||
end
|
|
||||||
|
|
||||||
Pricelist.pricelist_for(zone, operation, p)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
### VALIDATIONS ###
|
### VALIDATIONS ###
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue