summaryrefslogtreecommitdiff
path: root/vendor/plugins/thinking-sphinx/init.rb
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/thinking-sphinx/init.rb')
-rw-r--r--vendor/plugins/thinking-sphinx/init.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/plugins/thinking-sphinx/init.rb b/vendor/plugins/thinking-sphinx/init.rb
new file mode 100644
index 0000000..a7e3920
--- /dev/null
+++ b/vendor/plugins/thinking-sphinx/init.rb
@@ -0,0 +1,12 @@
1require 'thinking_sphinx'
2
3if Rails::VERSION::STRING.to_f < 2.1
4 ThinkingSphinx::Configuration.instance.load_models
5end
6
7if Rails::VERSION::STRING.to_f > 1.2
8 require 'action_controller/dispatcher'
9 ActionController::Dispatcher.to_prepare :thinking_sphinx do
10 ThinkingSphinx::Configuration.instance.load_models
11 end
12end \ No newline at end of file