diff options
author | Alex Legler <alex@a3li.li> | 2015-12-13 13:29:59 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2015-12-13 13:29:59 +0100 |
commit | 1f4743f2ae61a7f443980359303d6d631b2426fc (patch) | |
tree | db1a8aafc861eb8fcbf15993090784fa86a55eea /lib/index.rb | |
parent | Use protocol-relative URI for the favicon (diff) | |
download | frontend-1f4743f2ae61a7f443980359303d6d631b2426fc.tar.gz frontend-1f4743f2ae61a7f443980359303d6d631b2426fc.tar.bz2 frontend-1f4743f2ae61a7f443980359303d6d631b2426fc.zip |
Style fixes
Diffstat (limited to 'lib/index.rb')
-rw-r--r-- | lib/index.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/index.rb b/lib/index.rb index 328b74b..3e88a43 100644 --- a/lib/index.rb +++ b/lib/index.rb @@ -18,7 +18,7 @@ def threads_in_month(list, year, month, page) } }, sort: { - date: 'desc', + date: 'desc' } } ) @@ -30,7 +30,7 @@ def most_recent(list, n) size: n, body: { sort: { - date: 'desc', + date: 'desc' } } ) @@ -40,7 +40,7 @@ def most_recent(list, n) else return result['hits']['hits'] end -rescue => e +rescue => _e [] end @@ -58,7 +58,7 @@ def messages_in_month(list, year, month, page) } }, sort: { - date: 'desc', + date: 'desc' } } ) @@ -99,7 +99,7 @@ def get_message_count_internal(list) size: 1, body: {} )['hits']['total'] -rescue => e +rescue => _e '?' end @@ -120,7 +120,7 @@ def get_message(list, hash) end def get_parent_data(list, parent_id) - return nil if parent_id == nil + return nil if parent_id.nil? parent = $es.search( index: 'ml-' + list, @@ -135,7 +135,7 @@ def get_parent_data(list, parent_id) end def get_child_data(list, parent_id) - return nil if parent_id == nil + return nil if parent_id.nil? children = $es.search( index: 'ml-' + list, |