blob: 87fd46d16979d5e81c07ed18c0d163b7e3e00c0f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
class Entry < ApplicationRecord
has_many :records, as: :recordable, inverse_of: :recordable
validates :slug, presence: true, format: /\A[-a-z0-9]+\z/
accepts_nested_attributes_for :records, allow_destroy: true
def path
"/says/#{slug}"
end
end
|