upgrading to Rails 4: symbolized order queries
upgrading to Rails 4: workaround preventing redundant inner joins