Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Setup to use 3.2 automatic EXPLAIN

  • Loading branch information...
commit d9091d784b15b470ed413ccecf0068509e48444b 1 parent b4e3664
Jeff Casimir jcasimir authored
2  Gemfile
View
@@ -1,6 +1,6 @@
source 'http://rubygems.org'
-gem 'rails', '3.2.0'
+gem 'rails', '3.2.1'
gem 'sqlite3'
gem 'jquery-rails'
66 Gemfile.lock
View
@@ -1,31 +1,31 @@
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.2.0)
- actionpack (= 3.2.0)
+ actionmailer (3.2.1)
+ actionpack (= 3.2.1)
mail (~> 2.4.0)
- actionpack (3.2.0)
- activemodel (= 3.2.0)
- activesupport (= 3.2.0)
+ actionpack (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- journey (~> 1.0.0)
+ journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.1)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
- activemodel (3.2.0)
- activesupport (= 3.2.0)
+ activemodel (3.2.1)
+ activesupport (= 3.2.1)
builder (~> 3.0.0)
- activerecord (3.2.0)
- activemodel (= 3.2.0)
- activesupport (= 3.2.0)
+ activerecord (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
arel (~> 3.0.0)
tzinfo (~> 0.3.29)
- activeresource (3.2.0)
- activemodel (= 3.2.0)
- activesupport (= 3.2.0)
- activesupport (3.2.0)
+ activeresource (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
+ activesupport (3.2.1)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.6)
@@ -40,9 +40,9 @@ GEM
xpath (~> 0.1.4)
childprocess (0.3.0)
ffi (~> 1.0.6)
- coffee-rails (3.2.1)
+ coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
- railties (~> 3.2.0.beta)
+ railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
@@ -63,7 +63,7 @@ GEM
guard (>= 0.10.0)
hike (1.2.1)
i18n (0.6.0)
- journey (1.0.0)
+ journey (1.0.1)
jquery-rails (2.0.0)
railties (>= 3.2.0.beta, < 5.0)
thor (~> 0.14)
@@ -85,17 +85,17 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.2.0)
- actionmailer (= 3.2.0)
- actionpack (= 3.2.0)
- activerecord (= 3.2.0)
- activeresource (= 3.2.0)
- activesupport (= 3.2.0)
+ rails (3.2.1)
+ actionmailer (= 3.2.1)
+ actionpack (= 3.2.1)
+ activerecord (= 3.2.1)
+ activeresource (= 3.2.1)
+ activesupport (= 3.2.1)
bundler (~> 1.0)
- railties (= 3.2.0)
- railties (3.2.0)
- actionpack (= 3.2.0)
- activesupport (= 3.2.0)
+ railties (= 3.2.1)
+ railties (3.2.1)
+ actionpack (= 3.2.1)
+ activesupport (= 3.2.1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -118,11 +118,11 @@ GEM
rspec (~> 2.8.0)
rubyzip (0.9.5)
sass (3.1.12)
- sass-rails (3.2.3)
- railties (~> 3.2.0.beta)
+ sass-rails (3.2.4)
+ railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
- selenium-webdriver (2.17.0)
+ selenium-webdriver (2.18.0)
childprocess (>= 0.2.5)
ffi (~> 1.0.9)
multi_json (~> 1.0.4)
@@ -138,7 +138,7 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.31)
- uglifier (1.2.2)
+ uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
xpath (0.1.4)
@@ -157,7 +157,7 @@ DEPENDENCIES
guard-rspec
jquery-rails
launchy
- rails (= 3.2.0)
+ rails (= 3.2.1)
rspec-rails
sass-rails
sqlite3
2  app/models/article.rb
View
@@ -15,7 +15,7 @@ def tag_list
end
def self.most_popular
- Article.all.sort_by{|a| a.comments.count}.last
+ Article.all.sort_by{|a| a.comments.size}.last
end
def tag_list=(input)
2  config/environments/development.rb
View
@@ -27,4 +27,6 @@
# Expands the lines which load the assets
config.assets.debug = true
+
+ config.active_record.auto_explain_threshold_in_seconds = 0.2
end
11 config/initializers/quiet_assets.rb
View
@@ -0,0 +1,11 @@
+Rails.application.assets.logger = Logger.new('/dev/null')
+Rails::Rack::Logger.class_eval do
+ def call_with_quiet_assets(env)
+ previous_level = Rails.logger.level
+ Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0
+ call_without_quiet_assets(env).tap do
+ Rails.logger.level = previous_level
+ end
+ end
+ alias_method_chain :call, :quiet_assets
+end
Please sign in to comment.
Something went wrong with that request. Please try again.