Refactor abstract_word_count method

This commit is contained in:
Björn Geuken 2015-04-17 15:37:21 +02:00
parent 9f3da955f0
commit 80f8bba951
2 changed files with 21 additions and 5 deletions

View file

@ -155,11 +155,7 @@ class Event < ActiveRecord::Base
end
def abstract_word_count
if abstract.nil?
0
else
abstract.split.size
end
abstract.to_s.split.size
end
def week