mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
- Do not show registrant address unless "address_processing" is enabled - Add missing registrant state and zip attributes #480
24 lines
526 B
Ruby
24 lines
526 B
Ruby
class RegistrantPresenter
|
|
delegate :name, :ident, :email, :priv?, :id_code, :reg_no,
|
|
:street, :city, :state, :zip, :country,
|
|
:ident_country,
|
|
to: :registrant
|
|
|
|
def initialize(registrant:, view:)
|
|
@registrant = registrant
|
|
@view = view
|
|
end
|
|
|
|
def country(locale: I18n.locale)
|
|
registrant.country.translation(locale)
|
|
end
|
|
|
|
def ident_country(locale: I18n.locale)
|
|
registrant.ident_country.translation(locale)
|
|
end
|
|
|
|
private
|
|
|
|
attr_reader :registrant
|
|
attr_reader :view
|
|
end
|