From ad80c40944743515a45d70014e8d5ffb88cd74fc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 25 Jun 2017 00:00:28 -0400 Subject: Started designing index page --- app/models/entry.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/models/entry.rb (limited to 'app/models/entry.rb') diff --git a/app/models/entry.rb b/app/models/entry.rb new file mode 100644 index 0000000..22b330a --- /dev/null +++ b/app/models/entry.rb @@ -0,0 +1,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 -- cgit 1.4.1