diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-07-07 16:23:04 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-07-07 16:23:04 -0400 |
commit | 42d9db526d3aef2e08848d6bc587feaf3700db42 (patch) | |
tree | 29bfcb6653bb6419fa087f87de72b00b00e68fd6 /app/models/stream.rb | |
parent | dd231a335758873dcd9024db7618837094fcc0a5 (diff) | |
download | thoughts-42d9db526d3aef2e08848d6bc587feaf3700db42.tar.gz thoughts-42d9db526d3aef2e08848d6bc587feaf3700db42.tar.bz2 thoughts-42d9db526d3aef2e08848d6bc587feaf3700db42.zip |
Added tags
Blogs and streams can now be tagged. Records now show the appropriate tags for an entry. Updates work oddly, because their records show the stream's tags, since updates do not have tags themselves. refs #2
Diffstat (limited to 'app/models/stream.rb')
-rw-r--r-- | app/models/stream.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/stream.rb b/app/models/stream.rb index 1398b75..0773143 100644 --- a/app/models/stream.rb +++ b/app/models/stream.rb | |||
@@ -1,6 +1,8 @@ | |||
1 | class Stream < ApplicationRecord | 1 | class Stream < ApplicationRecord |
2 | include Recordable | 2 | include Recordable |
3 | 3 | ||
4 | acts_as_taggable | ||
5 | |||
4 | has_many :updates | 6 | has_many :updates |
5 | 7 | ||
6 | validates :title, presence: true | 8 | validates :title, presence: true |
@@ -9,4 +11,8 @@ class Stream < ApplicationRecord | |||
9 | def path | 11 | def path |
10 | "/thinks/#{slug}" | 12 | "/thinks/#{slug}" |
11 | end | 13 | end |
14 | |||
15 | def taggable | ||
16 | self | ||
17 | end | ||
12 | end | 18 | end |