about summary refs log tree commit diff stats
path: root/app/models/entry.rb
blob: 22b330ace7c616fb7d1ab68e2c68136b0d4044da (plain) (blame)
1
2
3
4
5
6
7
8
9
class Entry < ApplicationRecord
  has_many :records, as: :recordable

  validates :slug, presence: true, format: /\A[-a-z0-9]+\z/

  def path
    "/says/#{slug}"
  end
end