Displaying 20 results from an estimated 2000 matches similar to: "Best Gem For Threaded Comment Storage?"
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/.
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
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
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
2012 Jun 08
7
filter children with acts_as_tree
Hello Experts,
I have a tree of categories in this category object there is a property
called type.
the root categories have no type but the children have. so how I can get
all the roots with filled in children that have category type = ''B'' for
instance.
I tried to run Category.roots then delete children With a category not
equal to ''B'' but this causes a major
2010 Sep 11
10
Having difficulty with threaded comments, using acts_as_tree
I''ve been having problems making threaded comments for the last few
days. Mainly with creating children and displaying the children.
Currently, I have comments shown at the bottom of my articles show view.
The top level comments work, but I do not really know how to implement a
way for users to "reply" to the top level comments and take them to a
form (the comment
2010 Dec 07
10
Advice on data design idea
I''m about to embark on a project and am seeking advice on my approach.
I have an automotive site that needs to have shared categories. I''ve
checked out different nested set, ancestral, acts_as_tree, acyclic
plugins but feel they don''t exactly fit.
So I am about to roll my own simple solution. Any feedback as to
whether this looks good is appreciated.
Essentially I
2010 Feb 09
3
acts_as_tree question
Hi,
I''m trying to implement a very simple acts_as_tree search in my index
html.
I am able to show the parents, with no issue, but the children will
not show.
I have something like this for the parent, which displays fine:
<% for group in Group.roots %>
<td>
<tr>
<a href="#" onclick="Effect.BlindDown(''show_<%=
2009 Aug 16
1
Application caching in the browser?
Hello people,
Are any of you implementing application caching in the browser?
Here is the use-case I am interested in:
End-user-Bob uses his browser to navigate to
the_bob_end_user_crm_app.com
While there he navigates to these URLs:
the_bob_end_user_crm_app.com/accts/show/123
the_bob_end_user_crm_app.com/accts/show/321
the_bob_end_user_crm_app.com/accts/show/45678
Each of the above URLs
2007 Apr 29
1
better nested set and :through
Hello all,
It''s been a while since i''ve been doing any rails development, so i''m a
bit rusty. Having found this:
http://opensource.symetrie.com/api/better_nested_set/
it looks really interesting and useful for solving something i''m trying
to get working.
What i have (essentially) is the following models:
class Group < ActiveRecord::Base
2009 Sep 01
5
Deep nested associations on the same Model
This could be a lot simpler than I think and I''m just missing something
obvious!
I''m working on a creative collaboration app whereby one user could
submit a Story and this can then be forked by another user and worked on
seperately. To acheive this I have a has_many association within the
same Story model as such:
class Story < ActiveRecord::Base
has_many
2010 May 25
2
Site Navigation With Polymorphic Has Many Through
Hi, seem to keep running into a wall here. I can''t find any resources on
site navigation that can deal with any model being in the nav, allow
nesting, and can dynamically update.
So I thought about it for a while, and decided on a MenuItems class, which
contained the position of the child in relation to it''s siblings, where the
parent and the child were polymorphic. Then a given
2009 Nov 26
2
[error] avahi_entry_group_add_service_strlst("AdminNodeFQDN") failed: Invalid host name
Hi,
After doing a clean install of ovirt in a Fedora 11 VM, I am unable to
get anything working in the web interface. All I get is an error 500.
After reviewing the logs I see the following error in
/var/log/http/error.log
[Thu Nov 26 11:29:11 2009] [notice] Apache/2.2.13 (Unix) DAV/2
mod_auth_kerb/5.4 mod_nss/2.2.11 NSS/3.12.2.0 mod_python/3.3.1
Python/2.6 configured -- resuming normal
2009 Oct 31
1
Reply to this comment
I have a kind of blog. How to make the possibility to reply to
comment? Namely, how to make a tree of comments?
Thanks for any help :)
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
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 Dec 25
2
Active Record acts_as_tree and leaf depth
Using acts_as_tree, is it possible to get information of the depth a
tree leaf in relation to the root? Or is available to derive
information to save in the way "position" can be derived and saved for
acts_as_list.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2010 Jun 04
4
Mac OS/X and Rails 3 ?
Hello List,
Label me a newb, but how do you install Rails 3 on your Mac?
Google sent me to these URLs:
http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release/
http://guides.rails.info/3_0_release_notes.html
http://asciicasts.com/episodes/200-rails-3-beta-and-rvm
From early Feb 2010 I see this short recipe:
gem install tzinfo builder memcache-client rack rack-test rack-mount
erubis mail
2005 May 17
8
acts_as_tree elegant tree printing
Hi,
I''m working with acts_as_tree to print an unordered list of items:
Root
-- Child
---- Child
I''ve got this working, however I''d like to know if there is a more
elegant fashion that I''m unaware of:
#Takes a parent category and recursivley returns all children
def find_all_subcategories(category)
if category.children.size > 0
2006 May 23
7
self-referencing has_many
Having a devil of a time finding records in a self-referencing has_many
table relationship.
Everything is working find looking at the has_many and the belongs_to
relationship.
But, when I try to find all "orphans", records that are neither a parent
nor a child, I can not find a query that work in ActiveRecord.
This query works in MySQL:
SELECT * FROM templates
LEFT JOIN templates