about summary refs log tree commit diff stats
path: root/app/models
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-11 12:26:55 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-11 12:26:55 -0400
commit85de7c04ab66e8029d69b350fbfecd22a8673fc2 (patch)
tree0cb0be99597d2395ebe6464a5328486a35c3e7b8 /app/models
parente09aa803cf3905c82c29dbaa9101cc4a4639cc5a (diff)
downloadthoughts-85de7c04ab66e8029d69b350fbfecd22a8673fc2.tar.gz
thoughts-85de7c04ab66e8029d69b350fbfecd22a8673fc2.tar.bz2
thoughts-85de7c04ab66e8029d69b350fbfecd22a8673fc2.zip
Blog title links
Diffstat (limited to 'app/models')
-rw-r--r--app/models/blog.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/blog.rb b/app/models/blog.rb index c12d0dc..415167c 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb
@@ -26,6 +26,10 @@ class Blog < ApplicationRecord
26 body[0..(body.index("<!--MORE-->")-1)] 26 body[0..(body.index("<!--MORE-->")-1)]
27 end 27 end
28 28
29 def to_param
30 slug
31 end
32
29 private 33 private
30 def set_draft_title 34 def set_draft_title
31 if self.title.blank? and not self.published 35 if self.title.blank? and not self.published