[Groonga-commit] groonga/heroku-sample-rroonga-blog at 9b809b0 [master] Do nothing when Groonga isn't initialized

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 23 10:46:22 JST 2016


Kouhei Sutou	2016-02-23 10:46:22 +0900 (Tue, 23 Feb 2016)

  New Revision: 9b809b0b2dd83718ead8ab9cdf2d5df052a98b49
  https://github.com/groonga/heroku-sample-rroonga-blog/commit/9b809b0b2dd83718ead8ab9cdf2d5df052a98b49

  Message:
    Do nothing when Groonga isn't initialized

  Modified files:
    app/groonga/post_indexer.rb

  Modified: app/groonga/post_indexer.rb (+2 -0)
===================================================================
--- app/groonga/post_indexer.rb    2016-02-23 10:14:06 +0900 (473752b)
+++ app/groonga/post_indexer.rb    2016-02-23 10:46:22 +0900 (1815e3a)
@@ -4,12 +4,14 @@ class PostIndexer
   end
 
   def add(post)
+    return if****@posts*****?
     attributes = post.attributes
     id = attributes.delete('id')
     @posts.add(id, attributes)
   end
 
   def remove(post)
+    return if****@posts*****?
     @posts[post.id].delete
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index