query_reviewer
query_reviewer copied to clipboard
Any chance of a Rails3 port?
Right now, if you try to use query reviewer with Rails3, you get the following error:
uninitialized constant ActiveRecord::ConnectionAdapters::MysqlAdapter
I'm getting:
undefined method 'perform_action' for class ActionController::Base (NameError)
controller_extensions.rb:10
+1 I'd love to see a port of this useful plugin : )
In the meantime, does anybody knows of a plugin that helps counting the number of sql queries performed? That was useful!
Thanks!
Ariera, you can try:
grep "select|update|delete" --count development.log
Grep is very usefull in these cases
nice! Tanks for the advice emoreth!
Be aware only that this will match "updated_at" columns and stuff like that.
For my logs i need to run grep "SELECT |UPDATE |DELETE " --count development.log
Using it without --count will help seeing if they are matching what you need.
Here's a version that's at least semi working with rails 3: https://github.com/jimneath/query_reviewer
This was fixed in my fork (now merged with mainline)
awesome, thanks :)
http://weblog.rubyonrails.org/2011/12/6/what-s-new-in-edge-rails-explain
Rails 3 support: https://github.com/nesquena/query_reviewer