Sha256: 28d715881f5472cc07c3eb9f4633e820c2d38ca7f7dd2cb196c0201eb915e031

Contents?: true

Size: 272 Bytes

Versions: 9

Compression:

Stored size: 272 Bytes

Contents

module EgovUtils
  class Person < ApplicationRecord

    validates :firstname, :lastname, :birth_date, presence: true
    validates :birth_date, uniqueness: { scope: [:firstname, :lastname] }

    def fullname
      firstname.to_s + ' ' + lastname.to_s
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
egov_utils-0.1.12 app/models/egov_utils/person.rb
egov_utils-0.1.11 app/models/egov_utils/person.rb
egov_utils-0.1.10 app/models/egov_utils/person.rb
egov_utils-0.1.9 app/models/egov_utils/person.rb
egov_utils-0.1.8 app/models/egov_utils/person.rb
egov_utils-0.1.7 app/models/egov_utils/person.rb
egov_utils-0.1.6 app/models/egov_utils/person.rb
egov_utils-0.1.5 app/models/egov_utils/person.rb
egov_utils-0.1.4 app/models/egov_utils/person.rb