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
In Rails 3.1, count is ignoring the include specified in my default_scope in BudgetAccount - | |
class Budget | |
has_many :accounts, :class_name => 'BudgetAccount', :as => :poly, :dependent => :destroy | |
end | |
class BudgetAccount | |
belongs_to :account | |
belongs_to :poly, :polymorphic => true | |
default_scope where('accounts.inactive = ?', false).order('accounts.number').includes(:account) |
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
#!/bin/bash | |
# | |
# Unicorn application launcher | |
# Load the env config and RVM | |
. /etc/unicorn/$1.conf | |
. /usr/local/rvm/scripts/rvm | |
# Switch to the proper ruby | |
rvm use $RUBY |