mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 22:21:11 +00:00
Refactor abstract_word_count method
This commit is contained in:
parent
9f3da955f0
commit
80f8bba951
2 changed files with 21 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue