There appears to be two bugs with :scope, one of which is conceptual. The regular bug is that it doesn''t look like the scope condition is being evaluated. The ternary operator ? : is still visible here in this output from MySQL: ./db/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'': Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''? ? "root_id IS NULL" : "root_id = #{root_id}")'' at line 1: SELECT max(rgt) AS max_rgt FROM dav_acl_inheritance WHERE (root_id.nil? ? "root_id IS NULL" : "root_id = #{root_id}") (ActiveRecord::StatementInvalid) The conceptual bug is that we are using the :scope condition in some class methods: def root self.find(:first, :conditions => "(#{acts_as_nested_set_options[:scope]} AND #{acts_as_nested_set_options[:parent_column]} IS NULL)") end # Returns roots when multiple roots (or virtual root, which is the same) def roots self.find(:all, :conditions => "(#{acts_as_nested_set_options[:scope]} AND #{acts_as_nested_set_options[:parent_column]} IS NULL)", :order => "#{acts_as_nested_set_options[:left_column]}") end end where the :scope may depend on evaluating an instance variable which won''t exist in this case. Of course, it may be possible that the :scope only restricts a column to a constant, in which case using :scope in a class method may make sense. Maybe we should have a :scope_class (I''m open to a better name) that gets applied inside both class and instance methods, whereas :scope will only get applied inside instance methods? Also, looking at root() and roots(), it''s kind of odd that they''re in the same module as acts_as_nested_set() . We should probably put those in a module called SingletonMethods and have acts_as_nested_set extend() that. -Tim