public
Description: This rails plugin not only runs "EXPLAIN" before each of your select queries in development, but provides a small DIV in the rendered output of each page with the summary of query warnings that it analyzed.
Homepage: http://code.google.com/p/query-reviewer/
Clone URL: git://github.com/dsboulder/query_reviewer.git
query_reviewer / init.rb
100644 14 lines (10 sloc) 0.483 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Include hook code here
 
require 'query_reviewer'
 
if QueryReviewer.enabled?
  ActiveRecord::ConnectionAdapters::MysqlAdapter.send(:include, QueryReviewer::MysqlAdapterExtensions)
  ActionController::Base.send(:include, QueryReviewer::ControllerExtensions)
  Array.send(:include, QueryReviewer::ArrayExtensions)
  
  if ActionController::Base.respond_to?(:append_view_path)
    ActionController::Base.append_view_path(File.dirname(__FILE__) + "/lib/query_reviewer/views")
  end
end