Permalink
Browse files

One more 1.2.x fix

  • Loading branch information...
pat committed Jan 2, 2009
1 parent c34f69b commit 5da6538898a5500fafa1143df835dfb30c4adf75
Showing with 5 additions and 3 deletions.
  1. +5 −3 init.rb
View
@@ -1,10 +1,12 @@
require 'thinking_sphinx'
-require 'action_controller/dispatcher'
if Rails::VERSION::STRING.to_f < 2.1
ThinkingSphinx::Configuration.instance.load_models
end
-ActionController::Dispatcher.to_prepare :thinking_sphinx do
- ThinkingSphinx::Configuration.instance.load_models
+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

0 comments on commit 5da6538

Please sign in to comment.