mirror of
https://github.com/internetee/registry.git
synced 2025-07-04 10:13:34 +02:00
Update domain presenter
This commit is contained in:
parent
9694b3e9f5
commit
aa364be8a9
2 changed files with 28 additions and 1 deletions
|
@ -1,11 +1,19 @@
|
|||
class DomainPresenter
|
||||
delegate :name, :registrant_name, to: :domain
|
||||
delegate :name, :registrant_name, :registrant_id, to: :domain
|
||||
|
||||
def initialize(domain:, view:)
|
||||
@domain = domain
|
||||
@view = view
|
||||
end
|
||||
|
||||
def expire_time
|
||||
view.l(domain.expire_time)
|
||||
end
|
||||
|
||||
def expire_date
|
||||
view.l(domain.expire_time, format: :date)
|
||||
end
|
||||
|
||||
def on_hold_date
|
||||
view.l(domain.on_hold_time, format: :date) if domain.on_hold_time
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue