From nickblack1 at gmail.com Mon Nov 5 08:04:52 2007 From: nickblack1 at gmail.com (Nick Black) Date: Mon, 5 Nov 2007 13:04:52 +0000 Subject: [Betternestedset-talk] First time using the plugin Message-ID: <223020e60711050504r6475e423p61613ce611695a8@mail.gmail.com> Hello, This is my first time using the betternestedset plugin with Rails 1.2.4 on Ubuntu Feisty. I installed it using: svn propset svn:externals 'betternestedset svn://rubyforge.org/var/svn/betternestedset/tags/release-0.1' vendor/plugins But now when I attempt to create a migration I get this error: /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant SymetrieCom::Acts::NestedSet (NameError) from /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing' from script/../config/../vendor/plugins/acts_as_nested_set/branches/ez-set/init.rb:11:in `load_plugin' from script/../config/../vendor/plugins/acts_as_nested_set/branches/ez-set/init.rb:9:in `class_eval' from script/../config/../vendor/plugins/acts_as_nested_set/branches/ez-set/init.rb:9:in `load_plugin' from /var/lib/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:401:in `load_plugin' from /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /var/lib/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:401:in `load_plugin' from /var/lib/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:185:in `load_plugins' ... 8 levels... from /var/lib/gems/1.8/gems/rails-1.2.3/lib/commands/generate.rb:1 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require' from script/generate:3 it seems that the SymetrieCom::Acts::NestedSet module isn't being loaded. Thanks in advance for any pointers. Cheers, -- Nick Black -------------------------------- http://www.blacksworld.net From linicks at gmail.com Mon Nov 5 11:11:44 2007 From: linicks at gmail.com (Nick Pavlica) Date: Mon, 5 Nov 2007 09:11:44 -0700 Subject: [Betternestedset-talk] First time using the plugin In-Reply-To: <223020e60711050504r6475e423p61613ce611695a8@mail.gmail.com> References: <223020e60711050504r6475e423p61613ce611695a8@mail.gmail.com> Message-ID: Nick, On 11/5/07, Nick Black wrote: > Hello, > > This is my first time using the betternestedset plugin with Rails > 1.2.4 on Ubuntu Feisty. I installed it using: > > svn propset svn:externals 'betternestedset > svn://rubyforge.org/var/svn/betternestedset/tags/release-0.1' > vendor/plugins > I'm using 'betternestedset' with rails 1.25 on Feisty without any issues. You may want to try installing the trunk version. From conradchu at conradchu.com Wed Nov 7 19:10:33 2007 From: conradchu at conradchu.com (Conrad Chu) Date: Wed, 07 Nov 2007 16:10:33 -0800 Subject: [Betternestedset-talk] Problem with after_update Message-ID: Hi everyone, Has anyone successfully used betternestedset with acts_as_versioned? I?m having problems with one of the callbacks: Inside vendor/plugins/acts_as_versioned/lib/acts_as_versioned.rb (line 205): after_update :save_version Doesn?t seem the save_version method is being called. I fixed it by changing it to after_save (which makes it work). I?ve been getting before_update and after_update callback problems in my model after adding betternestedset to it. I suspect it?s because betternestedset overrides AR?s update method in order to avoid concurrency issues with the rgt and lft columns. Any help? Thanks Conrad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/betternestedset-talk/attachments/20071107/689d4074/attachment.html From lesotdudestin at gmail.com Thu Nov 8 02:53:00 2007 From: lesotdudestin at gmail.com (Aimeric Pieters) Date: Thu, 8 Nov 2007 08:53:00 +0100 Subject: [Betternestedset-talk] Problem with after_update In-Reply-To: References: Message-ID: <111642B3-7F82-43BB-910B-2A9B18587F9E@gmail.com> Le 8 nov. 07 ? 01:10, Conrad Chu a ?crit : > Hi everyone, > > Has anyone successfully used betternestedset with acts_as_versioned? > > I?m having problems with one of the callbacks: > > Inside vendor/plugins/acts_as_versioned/lib/acts_as_versioned.rb > (line 205): > > after_update :save_version > > Doesn?t seem the save_version method is being called. I fixed it by > changing it to after_save (which makes it work). > > I?ve been getting before_update and after_update callback problems > in my model after adding betternestedset to it. I suspect it?s > because betternestedset overrides AR?s update method in order to > avoid concurrency issues with the rgt and lft columns. > > Any help? > > Thanks > Conrad Hi, I 've corrected the problem and i will give, in few days, a patch to the developers team. Sincerely yours, -- Aimeric Pieters Epita 2009 lesotdudestin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/betternestedset-talk/attachments/20071108/e1b9d515/attachment.html From justin at maccarthy.org Thu Nov 8 12:57:53 2007 From: justin at maccarthy.org (Justin MacCarthy) Date: Thu, 8 Nov 2007 17:57:53 +0000 Subject: [Betternestedset-talk] Using better_nested_set for menus, examples , best practise Message-ID: <9e9015d40711080957s716c195ci93f3ea4a06f67c21@mail.gmail.com> Hi all, I'm think that alot of people here are using better_nested_set for menus. I was thinking that it would be a good idea to setup a sample rails project with the everything needed to show examples, samples, etc. We could include * migrations for users to get started * basic views for creating , and editing menus * various helpers to display menus in various styles * advanced menu examples using javascript , ajax, CSS with rails helpers * advanced menu editing using drag drop etc * ideas on caching etc Would anyone be interested in such a project? If anyone has examples they can extract from their code to contribute , that would be great too I can host SVN repo for it. Justin From jc.michel at symetrie.com Thu Nov 8 16:54:09 2007 From: jc.michel at symetrie.com (Jean-Christophe Michel) Date: Thu, 8 Nov 2007 22:54:09 +0100 Subject: [Betternestedset-talk] Using better_nested_set for menus, examples , best practise In-Reply-To: <9e9015d40711080957s716c195ci93f3ea4a06f67c21@mail.gmail.com> References: <9e9015d40711080957s716c195ci93f3ea4a06f67c21@mail.gmail.com> Message-ID: <6F2294FF-A933-445C-80CB-58442669428E@symetrie.com> Hi, Le 8 nov. 07 ? 18:57, Justin MacCarthy a ?crit : > I'm think that alot of people here are using better_nested_set for > menus. > > I was thinking that it would be a good idea to setup a sample rails > project with the everything needed to show examples, samples, etc. Good idea ! > I can host SVN repo for it. We can have this in the repository I think. This running site could be pointed to by the project page. Jean-Christophe Michel -- symetrie.com Better Nested Set for rails: http://opensource.symetrie.com/trac/better_nested_set From jeremy.maziarz at gmail.com Mon Nov 12 17:47:30 2007 From: jeremy.maziarz at gmail.com (Jeremy Maziarz) Date: Mon, 12 Nov 2007 17:47:30 -0500 Subject: [Betternestedset-talk] acts_as_tree migration Message-ID: <67d998230711121447q752afeb4gf17fa592b3acfe0d@mail.gmail.com> I have been struggling for about 2-hours trying to work out migrating acts_as_tree to acts_as_nested_set. In the archives Krishna Dole said, "If you have multiple trees in your table, it is a little more complicated. You first need to give each tree scope (add a tree_id column) and then run the above method on a member of each tree." Not completely understanding that statement, I set out to implement it in a migration. Here is my result which appears to work. Please comment if you see anything that needs fixing. class ConvertCategoriesToNestedSet < ActiveRecord::Migration def self.up add_column :categories, :lft, :integer add_column :categories, :rgt, :integer add_column :categories, :root_id, :integer # Convert existing tree to nested set with scope Category.renumber_all Category.roots.each do |r| r.all_children.each do |c| c.update_attribute(:root_id, r.id) end r.update_attribute(:root_id, r.id) end end def self.down remove_column :categories, :lft remove_column :categories, :rgt remove_column :categories, :root_id end end ~Jeremy Maziarz jeremy dot maziarz at gmail dot com From erik at runeland.se Tue Nov 13 03:56:39 2007 From: erik at runeland.se (Erik Runeland) Date: Tue, 13 Nov 2007 09:56:39 +0100 Subject: [Betternestedset-talk] plugin/install doesn't seem to work..? Message-ID: <473966C7.50105@runeland.se> Hello all, I hope for some help here, since the very simple instructions to install the plugin doesn't seem to work well for me. The execution takes about 3 seconds and doesn't give any output and also the vendor/plugins directory is empty. This is what it looks like in my command window: C:\railsapps\my_app>ruby script/plugin install svn://rubyforge.org/var/svn/betternestedset/tags/stable/betternestedset C:\railsapps\my_app> I tried different svn://.. links and they all worked the same. My hope is that someone out there recognizes this behaviuor? Thank you for reading! /Erik From erik at runeland.se Tue Nov 13 08:15:09 2007 From: erik at runeland.se (Erik Runeland) Date: Tue, 13 Nov 2007 14:15:09 +0100 Subject: [Betternestedset-talk] Solved.. Re: plugin/install doesn't seem to work..? In-Reply-To: <473966C7.50105@runeland.se> References: <473966C7.50105@runeland.se> Message-ID: <4739A35D.3020304@runeland.se> Ok, I am sorry to have bothered you. The installation failed silently because I didn't have command line svn available. Cheers /Erik Erik Runeland skrev: > Hello all, > > I hope for some help here, since the very simple instructions to install > the plugin doesn't seem to work well for me. > > The execution takes about 3 seconds and doesn't give any output and also > the vendor/plugins directory is empty. > > This is what it looks like in my command window: > > C:\railsapps\my_app>ruby script/plugin install > svn://rubyforge.org/var/svn/betternestedset/tags/stable/betternestedset > > C:\railsapps\my_app> > > I tried different svn://.. links and they all worked the same. My hope > is that someone out there recognizes this behaviuor? > > Thank you for reading! > > /Erik > _______________________________________________ > Betternestedset-talk mailing list > Betternestedset-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/betternestedset-talk > From krishna at collaborativedrug.com Thu Nov 15 00:23:43 2007 From: krishna at collaborativedrug.com (Krishna Dole) Date: Wed, 14 Nov 2007 21:23:43 -0800 Subject: [Betternestedset-talk] Merging Better Nested Set? Message-ID: <8d64b97d0711142123t513447e7rafb228d037bb5882@mail.gmail.com> Hi, Now that acts_as_nested_set has been moved to a plugin, there has been talk on the Better Nested Set mailing list of merging our work into the official rails plugin. Before I put a patch together, I wanted to ask if the core team would be receptive to this. Is the official acts_as_nested_set plugin simply there for backwards compatibility, or does the core team want to see it beefed up and improved? Krishna From jlstar at free.fr Tue Nov 20 16:47:03 2007 From: jlstar at free.fr (=?ISO-8859-1?Q?Jo=EBl_AZEMAR?=) Date: Tue, 20 Nov 2007 22:47:03 +0100 Subject: [Betternestedset-talk] regression with rails-1.99.0 Message-ID: hello, the same code work well with rails-1.2.5 but crash with rails-1.99.0. If you update an object you have this error message: ArgumentError (wrong number of arguments (2 for 1)): /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ base.rb:2029:in `attributes_with_quotes' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ base.rb:2029:in `update_without_lock' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ locking/optimistic.rb:70:in `update_without_callbacks' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ callbacks.rb:240:in `update_without_timestamps' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ timestamp.rb:38:in `update' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ base.rb:2022:in `create_or_update_without_callbacks' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ callbacks.rb:213:in `create_or_update' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ base.rb:1774:in `save_without_validation' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ validations.rb:891:in `save_without_transactions' /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ transactions.rb:118:in `save' I have created a fresh and clean project for test. best reagrds From lesotdudestin at gmail.com Wed Nov 21 02:30:28 2007 From: lesotdudestin at gmail.com (Aimeric PIETERS) Date: Wed, 21 Nov 2007 08:30:28 +0100 Subject: [Betternestedset-talk] regression with rails-1.99.0 In-Reply-To: References: Message-ID: <454906c80711202330w427611a7i6e7a0319bc0a0948@mail.gmail.com> hi, Open /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ base.rb, line 2029, and change "attributes_with_quotes(false, false)" by "attributes_with_quotes(false)". 2007/11/20, Jo?l AZEMAR : > > hello, the same code work well with rails-1.2.5 but crash with > rails-1.99.0. If you update an object you have this error message: > > ArgumentError (wrong number of arguments (2 for 1)): > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > base.rb:2029:in `attributes_with_quotes' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > base.rb:2029:in `update_without_lock' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > locking/optimistic.rb:70:in `update_without_callbacks' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > callbacks.rb:240:in `update_without_timestamps' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > timestamp.rb:38:in `update' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > base.rb:2022:in `create_or_update_without_callbacks' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > callbacks.rb:213:in `create_or_update' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > base.rb:1774:in `save_without_validation' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > validations.rb:891:in `save_without_transactions' > /Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/ > transactions.rb:118:in `save' > > > I have created a fresh and clean project for test. > > best reagrds > _______________________________________________ > Betternestedset-talk mailing list > Betternestedset-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/betternestedset-talk > -- Pieters Aimeric EPITA 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/betternestedset-talk/attachments/20071121/009ef6de/attachment.html From fchen at uh.edu Fri Nov 30 05:21:16 2007 From: fchen at uh.edu (Feng Chen) Date: Fri, 30 Nov 2007 04:21:16 -0600 Subject: [Betternestedset-talk] promote child to ROOT Message-ID: <0JSB001HYE3GL8F0@mail.uh.edu> Is there anyway to promote a child to ROOT? I am using multi-root, single scope (i.e., no scope specified). It would be nice if move_to_child_of(nil) can do this ... Cheers! From dontfall at gmail.com Fri Nov 30 11:10:24 2007 From: dontfall at gmail.com (Krishna Dole) Date: Fri, 30 Nov 2007 08:10:24 -0800 Subject: [Betternestedset-talk] promote child to ROOT In-Reply-To: <0JSB001HYE3GL8F0@mail.uh.edu> References: <0JSB001HYE3GL8F0@mail.uh.edu> Message-ID: <8d64b97d0711300810l14083d7dtbfb10d22c8a55448@mail.gmail.com> Try moving the child to the left or right of one of the roots. That should do it. Krishna On Nov 30, 2007 2:21 AM, Feng Chen wrote: > Is there anyway to promote a child to ROOT? I am using multi-root, > single scope (i.e., no scope specified). > > It would be nice if move_to_child_of(nil) can do this ... > > Cheers! > > > _______________________________________________ > Betternestedset-talk mailing list > Betternestedset-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/betternestedset-talk > From lesotdudestin at gmail.com Mon Nov 26 08:33:05 2007 From: lesotdudestin at gmail.com (Aimeric PIETERS) Date: Mon, 26 Nov 2007 14:33:05 +0100 Subject: [Betternestedset-talk] [PATCH] update - before_create - before_destroy - uniq_destroy Message-ID: <454906c80711260533u349216fby22ce373eb302e2ea@mail.gmail.com> Hi, Actually, I work in a Rails application and use better_nested_set plugin. I met differents problems. - with update method overwritting, we couldn't use before_update - impossible to create my before_destroy and before_create method because they are implemented in the plugin. - we have not a uniq_destroy method So this patch corrects these problems. I would like developpers team opinion about my solutions and, if they are agree, I would like they include it in the project. -- Pieters Aimeric EPITA 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/betternestedset-talk/attachments/20071126/06dfc9ef/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream Size: 34264 bytes Desc: not available Url : http://rubyforge.org/pipermail/betternestedset-talk/attachments/20071126/06dfc9ef/attachment-0001.obj