summaryrefslogtreecommitdiff
path: root/app/models/forumthread.rb
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-05-11 06:43:56 +0200
committerjomo <github@jomo.tv>2014-05-11 06:43:56 +0200
commit19eb868a50735d3c717b45eebeee1f67ea7b827e (patch)
treea395959c558695fed240161bffaaa865dbcd3964 /app/models/forumthread.rb
parentdf030f4d2dfbf3708731d5ff53f17d3dac2d9d2e (diff)
Add markdown preview; fix bug with deleted editor
Diffstat (limited to 'app/models/forumthread.rb')
-rw-r--r--app/models/forumthread.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/models/forumthread.rb b/app/models/forumthread.rb
index c6070a7..eb328a5 100644
--- a/app/models/forumthread.rb
+++ b/app/models/forumthread.rb
@@ -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?