similar to: acts_as_tree order option

Displaying 20 results from an estimated 2000 matches similar to: "acts_as_tree order option"

2006 Jan 05
2
model with type attribute
Dear all, I have a table with a column named "type" and I ''d like to access the type field of the correspondant model object but I get a deprecation warning when I use the following code : modelObject.type "type deprecated use class instead" How can I access such a named field in rails ? Johan Johan Duflost Analyst Programmer Belgian Biodiversity Platform (
2006 Oct 05
1
sort
Dear all, It seems there''s a sort bug with ferret 0.10.9 on Debian. I sort the search results by a field which can contain null values. The string sort type doesn''t work. If I test the values and replace null by empty strings when indexing, it works. Johan Analyst Programmer Belgian Biodiversity Platform ( http://www.biodiversity.be) Belgian Federal Science Policy Office
2007 Jan 17
1
ferret and mongrel
Dear all, Does anybody know if there''s problem with ferret running with mongrel ? I got unpredictable segfaults. Everything works well with fastcgi instead of mongrel. I use ruby 1.8.5, apache 2, mod proxy, mongrel 0.3.13.4, ferret 0.10.13 and rails 1.1.6 Thanks, Johan Johan Duflost Analyst Programmer Belgian Biodiversity Platform ( http://www.biodiversity.be) Belgian Federal
2007 Jan 22
1
stopwords
Hello all, Does anybody know if the word ''other'' is a special word for ferret ? I don''t manage to index it ! Johan Johan Duflost Analyst Programmer Belgian Biodiversity Platform ( http://www.biodiversity.be) Belgian Federal Science Policy Office (http://www.belspo.be ) Tel:+32 2 650 5751 Fax: +32 2 650 5124
2006 Oct 05
4
search results autocompletion
Dear list, I ''m using a text input field with autocompletion . The suggestions come from a ferret index which is created by getting all the terms belonging to other indices. Here is the code: class Suggestion attr_accessor :term def self.index(create) [Person, Project, Orgunit].each{|kl| terms = self.all_terms(kl) terms.each{|term| suggestion =
2006 Jun 17
2
URL based on acts_as_tree using routes
Hi There! I''d like some feedback before I try to implement some funky rails routes based on an acts_as_tree model. I have a Page model that acts_as_tree. I''d like the URLs to look something like this: http://localhost/about-us/staff/jeff or, another example... http://localhost/what-we-do/products/our-great-cms/features/faqs/ So, as many sub-nodes the user creates,
2007 Feb 14
3
eager loading parents and children (acts_as_tree)
I am struggling with how to do eager loading of an acts_as_tree model. If the model Stuff acts_as_tree I know I can do this to get children as well: Stuff.find(:all, :include => :children) But what if the model I am including is the one that acts_as_tree? For example, say Picture belongs_to Category. Category acts_as_tree and I want to get all pictures that are members of a category that
2006 Apr 12
2
Why doesn''t acts_as_tree support :scope?
I want to implement a unique category tree per user in my system, and I was hoping to use "acts_as_tree" on my category model. It seems as if acts_as_tree makes the assumption that the entire table the model is off of is one large tree. I actually want each user to have their own category trees all stored in the category table so I need it to scope off of the user_id.
2006 Feb 08
1
Many-To-Many w/acts_as_tree?
Guys, I''m having a problem getting acts_as_tree working. It seems from the Agile book (p. 255) that acts_as_tree only supports one-to-one record relations, whereas I need many-to-many support. In other words, looking at the picture at the top of page 256 where where only 1 id is linked to 1 parent_id, I need multiple id''s linked to multiple parent_id''s - for
2008 Apr 12
1
acts_as_tree undefined method?
i have acts_as_tree installed as plugin under rails 2.0.2 and also its defined in class TreeItems, but when i put this in my view <ul class="tree_level1" id="cars">Furniture <% TreeItem.root.category.children do |cat_children| %> <li><a class="list_item" href="#"><%=h cat_children.name %></a></ li> <%
2007 Jan 25
1
acts_as_tree with acts_as_list
Hello all, I''m having trouble using acts_as_list with acts_as_tree to order the "children". I''ve found a few old posts on the web that seem to indicate that this once worked. class Whatever < ActiveRecord::Base acts_as_tree :order => :position acts_as_list :scope => :parent_id Although the ''position'' field is being populated, it appears
2006 Jul 20
3
acts_as_tree
Hello, I''m trying to create categories that have their own subcategories, and each subcategory may have its own subcategories, .. and so on. After some reading, I found out that the best way for creating such a thing is to use acts_as_tree, but I didn''t find any tutorial or article that explain this in a clear way. After a lot of work I was finally able to create categories and
2007 Apr 30
2
acts_as_tree
Hi folks, For my app, I needed to modify acts_as_tree (ActiveRecord::Acts::Tree) such that deleting a node would orphan sub-nodes, rather than deleting them. This is accomplished simply by allowing a :dependent option to the acts_as_tree method so that it can be set to :nullify. For my app, I simply did this by adding a file tree.rb to my lib directory and requiring it in the model. A number
2009 Feb 09
1
acts_as_tree
i''m using the command script/plugin install acts_as_tree but i''m still having Plugin not found: ["acts_as_tree"] any helps!!! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email
2006 Jun 08
2
counter_cache is not looking for children_count with acts_as_tree
Hi there, the acts_as_tree API says that I can set a counter cache and that it will automatically increment the "children_count" column. I did that but when I create a new page it asks for a "pages_count" column instead. Here is the relevant part of page.rb model: class Page < ActiveRecord::Base acts_as_tree :order => :position, :counter_cache => true
2006 Jul 17
1
acts_as_tree and :include
hello there, i have a model that uses acts_as_tree: >class GbEntry < ActiveRecord::Base > acts_as_tree :order => ''created_at DESC'' >end and i want it to paginate, including all children to avoid unnecessary db queries: > @gb_entry_pages, @gb_entries = > paginate :gb_entries, :per_page => 15, :order => ''created_at DESC'',
2006 May 24
0
Bump: filtering results in acts_as_tree
---------- Forwarded message ---------- From: Larry White <ljw1001@gmail.com> Date: May 23, 2006 10:35 AM Subject: filtering results in acts_as_tree To: rails@lists.rubyonrails.org I''m using a logical delete for a table and want to use acts_as_tree with it. Is there any way to filter the rows returned as the tree is traversed to include only those records where the deleted column
2006 Mar 08
0
acts_as_tree circular reference
my application is using acts_as_tree to create a directed graph. Everyone would work fine, except that nothing prevents the user to create a circular reference: >> item.parent=child >> item.save => true >> child.parent=item >> child.save => true I checked in the database, and there it is: an item that has as parent its own child! item.parent_id = child_id I
2006 Dec 23
0
:through => 'this', :that => acts_as_tree?!
Hi guys. was wondering, how would i access the various parents/nodes in an acts as tree, if that model is from a join model using :through? wa huh? ok.. Say my join class model is called "Crap" and there are two columns with foreign keys: spam_id and more_spam_id. Say the Spam class is an acts_as_tree.. I would hope we would be able to access it like we would a habtm: foo
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,