internetee-registry/app/presenters/registrant_presenter.rb
Artur Beljajev bfc0c0b74f Improve RegistrantChangeMailer
- Do not show registrant address unless "address_processing" is enabled
- Add missing registrant state and zip attributes

#480
2017-05-18 15:59:06 +03:00

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