Add markdown preview; fix bug with deleted editor

This commit is contained in:
jomo
2014-05-11 06:43:56 +02:00
parent df030f4d2d
commit 19eb868a50
19 changed files with 135 additions and 39 deletions

View File

@@ -15,16 +15,11 @@ class Forumthread < ActiveRecord::Base
end
def author
@author ||= if self.user_author.present?
user_author
else
User.first
end
@author ||= (user_author || User.first)
end
def editor
# can be nil
@editor ||= user_editor
@editor ||= (self.user_editor || User.first)
end
def edited?