This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deployment: | |
staging: | |
branch: master | |
commands: | |
- git push [email protected]:yakify-ci.git: | |
timeout: 600 | |
dependencies: | |
pre: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Problem: the query you want to build to bring back the right objects is complicated. When | |
# you try and eagerly load the objects you need it all breaks and goes to shit. This often | |
# happens if you are using "group" or "count", for instance. If you don't eagerly load the | |
# objects you need then you have an n+1 (or worse) problem as you make an additional query | |
# for each object you use. | |
# So try doing the query in two parts: 1) get the primary key for each object you need, | |
# 2) eagerly load all the objects that match. | |
# Grab the ids. Don't worry about eagerly loading. The important thing is that it doesn't |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveRecord | |
module ConnectionAdapters | |
class AbstractAdapter | |
protected | |
# Turn: | |
# User Load (6.3ms) SELECT * FROM "users" | |
# Into: | |
# User Load /app/views/_partial.erb:27 (6.3ms) in `_app_views_partial_erb` SELECT * FROM "users" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= stylesheet_link_tag :global, :cache => (Rails.env == 'development' ? nil : 'global') %> |
NewerOlder