Permalink
Browse files

Fix to only send in adapter extensions if one is found

  • Loading branch information...
1 parent b4d76e9 commit 191302201515ac3b626e12b6bebd3aab7606ef52 @nesquena nesquena committed Feb 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/query_reviewer/rails.rb
View
2 lib/query_reviewer/rails.rb
@@ -23,7 +23,7 @@ def self.inject_reviewer
ActiveRecord::Base
adapter_class = ActiveRecord::ConnectionAdapters::MysqlAdapter if defined? ActiveRecord::ConnectionAdapters::MysqlAdapter
adapter_class = ActiveRecord::ConnectionAdapters::Mysql2Adapter if defined? ActiveRecord::ConnectionAdapters::Mysql2Adapter
- adapter_class.send(:include, QueryReviewer::MysqlAdapterExtensions)
+ adapter_class.send(:include, QueryReviewer::MysqlAdapterExtensions) if adapter_class
# Load into controllers
ActionController::Base.send(:include, QueryReviewer::ControllerExtensions)
Array.send(:include, QueryReviewer::ArrayExtensions)

0 comments on commit 1913022

Please sign in to comment.