lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r522710 - /lucene/solr/trunk/client/ruby/flare/app/controllers/simile_controller.rb
Date Tue, 27 Mar 2007 02:00:18 GMT
Author: ehatcher
Date: Mon Mar 26 19:00:17 2007
New Revision: 522710

URL: http://svn.apache.org/viewvc?view=rev&rev=522710
Log:
Fix SimileController that broke with the plugin change

Modified:
    lucene/solr/trunk/client/ruby/flare/app/controllers/simile_controller.rb

Modified: lucene/solr/trunk/client/ruby/flare/app/controllers/simile_controller.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/flare/app/controllers/simile_controller.rb?view=diff&rev=522710&r1=522709&r2=522710
==============================================================================
--- lucene/solr/trunk/client/ruby/flare/app/controllers/simile_controller.rb (original)
+++ lucene/solr/trunk/client/ruby/flare/app/controllers/simile_controller.rb Mon Mar 26 19:00:17
2007
@@ -12,6 +12,8 @@
 
 
 class SimileController < ApplicationController
+  before_filter :flare_before
+  
   def exhibit
     @data = @flare.search(0, 10)
                                           
@@ -32,4 +34,14 @@
       format.xml # renders timeline.rxml
     end                                         
   end
+  
+  #TODO: this is duplicated from flare's 
+  private
+    def flare_before
+      # TODO: allow source of context to be configurable.
+      session[:flare_context] ||= Flare::Context.new(SOLR_CONFIG)
+
+      @flare = session[:flare_context]
+    end
+  
 end



Mime
View raw message