From Tony.Hillerson at effectiveui.com Mon Jun 2 15:36:59 2008 From: Tony.Hillerson at effectiveui.com (Tony Hillerson) Date: Mon, 2 Jun 2008 13:36:59 -0600 Subject: [Betternestedset-talk] Rails 2.1 Message-ID: <685BC11C-B9DB-4745-A77C-D97CE8CCB7FA@effectiveui.com> Anyone else noticing problems with Rails 2.1? I'm getting errors like this: ArgumentError: wrong number of arguments (3 for 2) gems/activerecord-2.1.0/lib/active_record/base.rb:2479:in `attributes_with_quotes' ... when saving. The attributes_with_quotes method on better_nested_set has a different signature of course. I'm looking into a patch, but I wondered if anyone else has seen this problem and fixed it already. Thanks, Tony From Tony.Hillerson at effectiveui.com Mon Jun 2 15:56:16 2008 From: Tony.Hillerson at effectiveui.com (Tony Hillerson) Date: Mon, 2 Jun 2008 13:56:16 -0600 Subject: [Betternestedset-talk] patch for bns with 2.1 Message-ID: Attached is a patch that gets BNS working with Rails 2.1. Not sure how to make this backwards compatible, nor if there is a better way to fix the problem right now. Let me know what you guys think. -------------- next part -------------- A non-text attachment was scrubbed... Name: bns2.1.patch Type: application/octet-stream Size: 25895 bytes Desc: not available URL: -------------- next part -------------- From ben at fearofpudding.com Sun Jun 8 03:38:51 2008 From: ben at fearofpudding.com (Ben) Date: Sun, 8 Jun 2008 17:38:51 +1000 Subject: [Betternestedset-talk] Question about getting roots for a given scope Message-ID: Hi All, I have just found this nested set plugin today and so far it is fitting my needs very well. I have one question. My application has a need for a nested set "per user" on the system. I would like to split these trees using a scope. so i have in my Task model - acts_as_nested_set :scope=>:user This all seems to work correctly. My question is, how can i get the roots for this user? To get the roots for the whole table I am using Task.roots() Is there a way i can get the roots for a given user? Thanks, ~Ben From beholdthepanda at gmail.com Sun Jun 8 11:07:03 2008 From: beholdthepanda at gmail.com (Stephen Schor) Date: Sun, 8 Jun 2008 11:07:03 -0400 Subject: [Betternestedset-talk] Question about getting roots for a given scope In-Reply-To: References: Message-ID: <45e5e9bc0806080807m27b215d0m474712577bcaf28c@mail.gmail.com> Hi Ben, If your task table has a user_id in it can you could roll your own getter in the User class like... has_many :root_tasks, :class => 'Task',:conditions => 'parent_id IS NULL' On Sun, Jun 8, 2008 at 3:38 AM, Ben wrote: > Hi All, > > I have just found this nested set plugin today and so far it is fitting my > needs very well. > I have one question. My application has a need for a nested set "per user" > on the system. I would like to split these trees using a scope. > > so i have in my Task model - acts_as_nested_set :scope=>:user > > This all seems to work correctly. My question is, how can i get the roots > for this user? To get the roots for the whole table I am using Task.roots() > > Is there a way i can get the roots for a given user? > > Thanks, > ~Ben > _______________________________________________ > Betternestedset-talk mailing list > Betternestedset-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/betternestedset-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at fearofpudding.com Mon Jun 9 23:06:35 2008 From: ben at fearofpudding.com (ben at fearofpudding.com) Date: Mon, 9 Jun 2008 20:06:35 -0700 (PDT) Subject: [Betternestedset-talk] Question about getting roots for a given scope In-Reply-To: <45e5e9bc0806080807m27b215d0m474712577bcaf28c@mail.gmail.com> References: <45e5e9bc0806080807m27b215d0m474712577bcaf28c@mail.gmail.com> Message-ID: <19982.124.190.97.251.1213067195.squirrel@webmail.fearofpudding.com> Thanks - that method works a treat. ~Ben > Hi Ben, > > If your task table has a user_id in it can you could roll your own getter > in > the User class like... > > has_many :root_tasks, :class => 'Task',:conditions => 'parent_id IS NULL' > > On Sun, Jun 8, 2008 at 3:38 AM, Ben wrote: > >> Hi All, >> >> I have just found this nested set plugin today and so far it is fitting >> my >> needs very well. >> I have one question. My application has a need for a nested set "per >> user" >> on the system. I would like to split these trees using a scope. >> >> so i have in my Task model - acts_as_nested_set :scope=>:user >> >> This all seems to work correctly. My question is, how can i get the >> roots >> for this user? To get the roots for the whole table I am using >> Task.roots() >> >> Is there a way i can get the roots for a given user? >> >> Thanks, >> ~Ben >> _______________________________________________ >> Betternestedset-talk mailing list >> Betternestedset-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/betternestedset-talk >> > _______________________________________________ > Betternestedset-talk mailing list > Betternestedset-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/betternestedset-talk > From cnk at caltech.edu Mon Jun 30 20:59:40 2008 From: cnk at caltech.edu (Cynthia Kiser) Date: Mon, 30 Jun 2008 17:59:40 -0700 Subject: [Betternestedset-talk] patch for bns with 2.1 In-Reply-To: References: Message-ID: <20080701005940.GN21704@blinky.caltech.edu> Quoting Tony Hillerson : > Attached is a patch that gets BNS working with Rails 2.1. Not sure how > to make this backwards compatible, nor if there is a better way to fix > the problem right now. Getting caught up on list mail. This 'patch' was the text of a git man page. Could you send the actual patch? THanks, -- Cynthia Kiser