diff options
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/blog.rb | 4 |
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 |
