Sha256: 325b9cdbea648caccab8a193e647b386678099cbd143bfb96b50abfd52b7c52b
Contents?: true
Size: 475 Bytes
Versions: 60
Compression:
Stored size: 475 Bytes
Contents
module EgovUtils class NaturalPerson < AbstractPerson belongs_to :person, class_name: 'EgovUtils::Person' validates :firstname, :lastname, :birth_date, presence: true validates :birth_date, uniqueness: { scope: [:firstname, :lastname] }, birthday: true def fullname firstname.to_s + ' ' + lastname.to_s end def to_s "#{fullname} (#{I18n.t(:text_born_on_at, place: birth_place, date: I18n.l(birth_date.to_date))})" end end end
Version data entries
60 entries across 60 versions & 1 rubygems