about summary refs log tree commit diff stats
path: root/app/models
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-08-12 07:10:16 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-08-12 07:10:16 -0400
commitc650bee03937bd0e741e701f1fe0bfe5cf8e040e (patch)
treec0020572ceef21498da9b52851242b22dba7aafe /app/models
parent77e849b66719f5e86762eff4ae23340dab1b32fa (diff)
downloadthoughts-c650bee03937bd0e741e701f1fe0bfe5cf8e040e.tar.gz
thoughts-c650bee03937bd0e741e701f1fe0bfe5cf8e040e.tar.bz2
thoughts-c650bee03937bd0e741e701f1fe0bfe5cf8e040e.zip
Add link entry type
Diffstat (limited to 'app/models')
-rw-r--r--app/models/link.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/link.rb b/app/models/link.rb new file mode 100644 index 0000000..81ffa2b --- /dev/null +++ b/app/models/link.rb
@@ -0,0 +1,15 @@
1class Link < ApplicationRecord
2 include Recordable
3
4 acts_as_taggable
5
6 validates :title, :url, presence: true
7
8 def path
9 url
10 end
11
12 def taggable
13 self
14 end
15end