public
Description: Sphinx plugin for Rails and Merb
Homepage: http://ts.freelancing-gods.com
Clone URL: git://github.com/freelancing-god/thinking-sphinx.git
Click here to lend your support to: thinking-sphinx and make a donation at www.pledgie.com !
thinking-sphinx / init.rb
100644 12 lines (10 sloc) 0.326 kb
1
2
3
4
5
6
7
8
9
10
11
12
require 'thinking_sphinx'
 
if Rails::VERSION::STRING.to_f < 2.1
  ThinkingSphinx::Configuration.instance.load_models
end
 
if Rails::VERSION::STRING.to_f > 1.2
  require 'action_controller/dispatcher'
  ActionController::Dispatcher.to_prepare :thinking_sphinx do
    ThinkingSphinx::Configuration.instance.load_models
  end
end