Displaying 20 results from an estimated 53 matches for "acts_as_nested_set".
2006 Feb 06
2
acts_as_nested_set
Where can I see the API acts_as_nested_set constructs? I''ve read its
page in api.rubyonrails.com but I don''t see how to manage the tree
from there.
-- fxn
2006 Jul 18
1
Bad values for acts_as_nested_set?
I moved from acts_as_tree to acts_as_nested_set because I need the
all_children method.
I''ve seen an alternative way to add this method to acts_as_tree here:
http://www.chuckvose.com/articles/2006/05/24/recursive-children
But I''d prefer to use the more efficient way of acts_as_nested_set (and
not to have to revert to my old...
2006 May 10
1
acts_as_nested_set does not work (in my case).
Hello,
I am using acts_as_nested_set. My problem is that the columns "lft" and
"rgt" get the value 0 if I create a new entity. If I delete an entity I
get negative values (-1, -2, -3) - but for all entities. Is there
anything missing? Is there any example for "acts_as_nested_set" in the
web?
--
Post...
2009 Aug 19
10
acts_as_list / acts_as_tree / acts_as_nested_set - which one
I am creating forum application which needs usage of acts_as_list or
acts_as_tree or acts_as_nested_set.
I am unable to decide among these. please could some one recommend from
their experience?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 14
0
acts_as_nested_set and acts_as_threaded
I''m trying to use acts_as_nested_set, as modifed by Bob Silva to add
threaded functionality. I''m getting the following error:
undefined method `display_threads'' for #<PostController:0x3ae9828>
...
#{RAILS_ROOT}/app/controllers/post_controller.rb:18:in `list''
Line 18 in post_controller.rb shows:
[po...
2006 Jun 20
2
Converting from acts_as_tree to acts_as_nested_set
I''m currently using acts_as_tree to display threaded Comments on my
forums-like site. It''s waaay too slow to display a page with 1,000
comments, as it''s issuing a TON of selects.
I''m pretty sure I want to convert to the nested set model, using
acts_as_nested_set or acts_as_threaded. This should give me the
performance I''m looking for.
The problem, of course, is the adjacency model that is used by
acts_as_tree only has parent_id, it doesn''t have the left/right data
needed by the nested set model.
Has anyone seen or written an algorith...
2006 May 10
2
Ordering of subsets in a model.
...menus. There''s
several menus (with their own model since each menu got some special
information). Now, I want to be able to specify the order of the menu
entries inside the menu. acts_as_list seems to not quite do the trick
since it does ordering "globally" on the whole model and
acts_as_nested_set seems like overkill since I''m never going to need
more then one menu''s entries at a time.
Should I got for acts_as_nested_set or should I simply create my own
ordering system with a column and some checks that makes sure no
numbers are repeated inside each menu''s entries...
2005 Oct 12
2
Help with act_as_nested_set
...ying to get act_as_nested_set working, and I''m puzzled.
I googled the following
http://codefetch.com/cache?url=http://media.pragprog.com/titles/rails/code/r
ails-code.tgz
<http://codefetch.com/cache?url=http://media.pragprog.com/titles/rails/code/
rails-code.tgz&path=rails-code/ar/acts_as_nested_set.rb&lang=ruby&qy=ruby>
&path=rails-code/ar/acts_as_nested_set.rb&lang=ruby&qy=ruby
Which I''m inserting here:
class Category < ActiveRecord::Base
acts_as_nested_set
end
Category.delete_all
def add_child(parent, name)
child = Category.create(:name => n...
2006 Feb 25
3
Enumerating over a Tree by Depth
I have a model using acts_as_tree which is working fine.
Being new to Ruby I''m don''t know what enumerator is best to use for
traversing a tree by depth. I can write one, but before I do I wanted
to know if there is there an enumerator for traversing trees available
that the community recommends?
Thank you,
Jose
--
Posted via http://www.ruby-forum.com/.
2006 Jan 16
2
acts_as_tree with Modified Preorder Traversal?
Has anyone extended Rails''s acts_as_tree to use the Modified Preorder
Traversal algorithm? This is a really clever trick for optimizing
access to trees stored in databases, as described lucidly in this
article:
http://www.sitepoint.com/article/hierarchical-data-database/2
It adds two integer fields, a "left counter" and "right counter", to
each row. By
2009 Feb 17
8
Converting Acts_As_Tree to Acts_As_Nested_Set
Hello,
I have a tree structure that needs to be converted into a nested set.
A great deal of work has already been done on the tree items, so
maintaining the integrity of the id''s is mandatory. However I need
the ability to access entire branches of the tree, which is what
Nested set does. Does anyone have any suggestions on how to
efficiently transfer the tree to the nested set and
2006 May 31
1
Help enhancing acts_as_nested_set
I''m trying to enhance acts_as_nested_set. Well actually I already have,
but I''ve done a hack up job of it. I would like to contribute these
enhancements back, but I need a little help.
I''m a complete newbie to this stuff. The only thing I new before coming
into this project was vanilla HTML. So over the course of tw...
2006 Feb 07
2
Is acts as nested set safe in a concurrent environment?
Hi I was wondering if acts_as_nested_set can be used safely with
concurrently updates? The fact that so much of the tree needs to be
rewritten on inserts concerns me. Is anyone actually using it. I
noticed that the status of acts_as_nested_set was unclear at the time
the rails book was written.
Regards,
Glen
2009 Jun 21
1
cannot do mass_assignment when inherited class ?
...on"=>"something new", "description"=>"<p>fsdfgdsg</
p>"}
Elibrary is declared as inherited from MediaItem, and attr are
declared accessible in MediaItem....
class MediaItem < ActiveRecord::Base
belongs_to :media_container
# Behaviours
acts_as_nested_set
attr_accessible :title, :short_description, :description
...
class Elibrary < MediaItem
end
when @elibrary = Elibrary.new, then assigning attributes to @elibrary,
save is OK.....
1- even duplicatiing the attr_accessible in both classes doesn''t help
2- acts_as_nested_set brought ad...
2007 Jul 18
10
Rails - Mock going out of scope?
Hello list,
I think I have a rails related RSpec problem with a mock going out of
scope on a recursive call to a model.
The code is at: http://pastie.textmate.org/79821 if you want to see it
highlighted. I have pasted it below as well.
Basically, I have an acts_as_nested_set model called "Node", which
works fine. I have a function which finds the language name of the
node instance. If the language is nil for the node instance being
queried, it then recursively calles language_name on it''s parent until
one of them has the language. Then this gets r...
2007 May 02
3
acts_as_tree related question
hi,
I''ve a normal Category model implemented with acts_as_tree (name,
parent_id) that has_many :products (name, category_id).
What I''m asking for is a method to fetch every product that belongs
fall into a particular category and its children, eg: if I''m asking
for a root node (/category/show/1) I need to display every product
that have category_id = 1 AND every product
2010 May 12
3
Best Gem For Threaded Comment Storage?
Dear List,
Given that I am developing a rails 2.3.5 site,
When it comes to storing threaded comments in a blog or forum,
Then which plugin/gem should be considered "State of the Art"?
I''m starting with these URLs:
http://github.com/rails/acts_as_tree
http://github.com/rails/acts_as_nested_set
http://github.com/collectiveidea/awesome_nested_set
http://github.com/chris/better_nested_set
http://github.com/elight/acts_as_commentable_with_threading
I''m looking for opinionated people with opinions about my question.
--
You received this message because you are subscribed to the Go...
2011 Feb 18
1
Rails plugins new official maintainers
...dshimy/http_authentication)
Darian Shimy
Lars Smit
auto_complete (https://github.com/david-kerins/auto_complete)
dkerins
Devdatta
atom_feed_helper (https://github.com/TrevorBramble/atom_feed_helper)
Trevor Bramble
acts_as_tree (https://github.com/amerine/acts_as_tree)
Mark Turner
Swanand Pagnis
acts_as_nested_set (https://github.com/bbommarito/acts_as_nested_set)
BrianBommarito
account_location (https://github.com/bbommarito/account_location)
BrianBommarito
render_component (https://github.com/malev/render_component)
Marcos Vanetta
localization (https://github.com/malev/localization)
Marcos Vanetta
dead...
2006 May 12
2
Has many through join table issues
I''m trying to wrap my caffeine soaked brain around has_many :through
following along at:
http://rails.techno-weenie.net/tip/2005/12/23/teaching_your_blog_model_new_tricks_with_has_many_through
I think my models are a little more complex than what fits this
narrative.
I have a directory of members, each member can belong to multiple
categories.
The category table references itself
2011 Mar 08
2
Rails - Acts as Nested - Impossible move, target node cannot be inside moved tree.
Hello, I''m using the Awesome Nested Set plugin:
https://github.com/collectiveidea/awesome_nested_set
And in my model I do the following:
acts_as_nested_set
after_save :ensure_max_nestedset_level
private
def ensure_max_nestedset_level
if self.level > 2
self.move_to_child_of(parent.parent)
end
end
I do this to keep the levels from getting to deep. Any idea why I''m getting
this "Impossible move, t...