lib/flare.rb in flare-1.4.4 vs lib/flare.rb in flare-1.6.1

- old
+ new

@@ -5,19 +5,28 @@ rescue LoadError require 'rubygems' require 'rsolr' end -%w(configuration collection index_builder session active_record).each do |file| +%w(collection index_builder session active_record).each do |file| require File.join(File.dirname(__FILE__), 'flare', file) end ActiveRecord::Base.send(:include, Flare::ActiveRecord) module Flare class << self + + attr_reader :solr_url + + def solr=(value) + @session = Flare::Session.new(value) + end + def session - @session ||= Flare::Session.new + return @session if @session + self.solr = "http://127.0.0.1:8983/solr" + @session end def indexed_models @@indexed_models ||= [] end \ No newline at end of file