Sha256: 4a0273f997a8334b4e636d46c7776fe452ffc0a02298c012da08e15e10334d41

Contents?: true

Size: 246 Bytes

Versions: 6

Compression:

Stored size: 246 Bytes

Contents

module Person
  extend ActiveSupport::Concern

  included do
    validates :name, :surname, presence: true

    def to_s
      "#{surname} #{name}"
    end

    def phonetic_reading
      "#{surname_reading} #{name_reading}"
    end

  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
gaku_core-0.0.3 app/models/concerns/person.rb
gaku-0.0.3 core/app/models/concerns/person.rb
gaku-0.0.2 core/app/models/concerns/person.rb
gaku_core-0.0.2 app/models/concerns/person.rb
gaku-0.0.1 core/app/models/concerns/person.rb
gaku_core-0.0.1 app/models/concerns/person.rb