friendly urls

This commit is contained in:
jomo
2014-09-22 06:46:08 +02:00
parent e767ec729c
commit 0f0a5c42b9
8 changed files with 37 additions and 2 deletions

View File

@@ -26,6 +26,10 @@ class Blogpost < ActiveRecord::Base
!!user_editor_id
end
def to_s
title
end
def send_new_mention_mail(old_content = "")
new_mentions = mentions(content) - mentions(old_content)
mails = []
@@ -42,4 +46,7 @@ class Blogpost < ActiveRecord::Base
background_mailer(mails)
end
def to_param
[id, to_s.parameterize].join("-")
end
end