[Betternestedset-talk] root with scope?

Peter Schrammel peter.schrammel at gmx.de
Fri Apr 4 13:31:02 EDT 2008


Hi,

I'm trying to get the root of a scoped set but all I get is:

r=Album.root(:user_id=>4)
ArgumentError: Unknown key(s): user_id

My code is quite simple:

class Album < ActiveRecord::Base
  acts_as_nested_set :scope => :user
end

The db has a user_id column and the columns BNS needs (parent_id,lft,rgt).

I'm useing the svn trunk of today. Any tips (I hope the bug is between
my ears)?


Thanks,

Peter


More information about the Betternestedset-talk mailing list