Ticket #14 (closed defect: wontfix)

Opened 2 years ago

Last modified 2 years ago

Can't create with a parent_id

Reported by: anonymous Assigned to: jcm
Priority: trivial Milestone: 0.1 with tests
Component: plugin Version: trunk
Keywords: Cc:

Description

If I've got model Category, acting as a nested set (through better_nested_set) I'm unable to create objects that have a parent_id -- it's is nulled out.

Category.create(:name => 'test', :parent_id => 28) Category.find_by_name('test').parent_id

==> nil

For the past 6 months or so I've been using some code from act_as_threaded -- http://www.railtie.net/articles/2006/03/31/implement-acts_as_threaded-without-a-plugin -- which relies on acts_as_nested_set. It's broken when using better_nested_set. Still trying to figure out exactly why.

Change History

09/11/06 15:34:09 changed by jcm

  • priority changed from major to trivial.
  • status changed from new to assigned.
  • owner changed from somebody to jcm.

At first glance, I think that better_nested_set and acts_as_threaded change the same part of ActiveRecord?. Since I don't use acts_as_threaded, it's highly probable that they conflict. This said, probably better_ns can be enough to present threaded forums. Why did you want to change ? what was missing in threaded that you thought you would find with better_ns ?

Nota: if you use Category.create, it cannot work. Please see the readme for the changed syntax. parent_id is internal, you should not change it yourself. Use:

c = Category.new whatever c.save c.move_to_child_of parent_id

Please provide some more info, this is not a clear bug report ;-)

10/10/06 13:35:38 changed by jcm

  • status changed from assigned to closed.
  • component changed from component1 to plugin.
  • version set to trunk.
  • resolution set to wontfix.
  • milestone set to 0.1 with tests.

Will reopoen if more info given.