story_text may not be present

This commit is contained in:
Peter Bhat Harkins 2020-08-25 09:39:05 -05:00
parent 973ec9f8a5
commit c39561f2f3
2 changed files with 3 additions and 2 deletions

View File

@ -439,7 +439,7 @@ class Story < ApplicationRecord
s = if self.description.present?
self.markeddown_description.gsub(/<[^>]*>/, "")
else
self.story_text.body
self.story_text && self.story_text.body
end
if chars > 0 && s.to_s.length > chars

View File

@ -76,7 +76,8 @@
<p>
Some things that are off-topic here but popular on larger, similar sites:
entrepreneurship, management, news about companies that employ a lot of programmers,
investing, world events, anthropology, self-help, personal productivity systems, and
investing, world events, anthropology, self-help, personal productivity systems,
last-resort customer service requests via public shaming, and
defining the single morally correct economic and political system for the entire world when we can't even settle tabs vs. spaces.
</p>