diff options
Diffstat (limited to 'app/models/comment.rb')
-rw-r--r-- | app/models/comment.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/comment.rb b/app/models/comment.rb index ab4acfe56..415924fbb 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -82,6 +82,10 @@ class Comment < ActiveRecord::Base end end + def first_three_words + body.split.first(3).join(' ') + end + private def check_body_has_content |