collectiveidea/awesome_nested_set — pull request #109 by freelancing-god (2011-12-22 06:20:41+00:00)
Title: Avoid default_scopes (that may change SQL order)

Heya Phil

Just hit a problem with awesome_nested_set - when there's a default scope setting up an ORDER clause, obtaining the last rgt value (for new records) doesn't work because the "rgt DESC" is appended to the existing ORDER clause, instead of overwriting it.

Ensuring the query is unscoped explicitly fixes the problem. And you get a spec thrown in for free! ;)