search for: act_as_tree

Displaying 16 results from an estimated 16 matches for "act_as_tree".

Did you mean: acts_as_tree
2009 Nov 25
1
CMS act_as_tree and modular architecture
I am developing a CMS using act_as_tree for the pages and act_as _list to order them (as shown on Railscasts). Each page can load a custom ERB template, for instance I have one to display a standard article and one to display a group of articles (so acting as a category of underling articles). If I want to develop a forum, let''...
2006 Jul 18
0
act_as_tree with ordered items
Hello I am using a data structure that resembles a tree with ordered items. I know I can use :order in act_as_tree to sort the items at each level, but since the items have no logical order I would have to use a table column just to store this order. My experience with position indices of this kind is that it can lead to inconsistencies in the database so I am reluctant to use such a solution. So my questi...
2007 Jul 05
0
act_as_tree, belongs_to and has_many foreign keys incorrect
Two models: class Project << ActiveRecord::Base has_many :files end class File << ActiveRecord::Base has_one :project acts_as_tree end Inside of the project model, when creating a new product, I want to store the hierarchy of files within it. If I do, my_top_level_file = my_project_object.files.create(:file_name => ''foo'');
2008 Mar 12
0
CMS act_as_tree problem and template_root
Hi, I want use the comatose CMS plug in for creatin one application. I installed all the things. When I run this application I got this error. "template_root". Please clear my problem. And How can I create one application by using the comatose. Please send the sample application if available. Thank you, srinivas rao.pala -- Posted via http://www.ruby-forum.com/.
2006 Jan 15
2
acts_as_tree & acts_as_list for a single model?
Hi, If I have a db table categories - id - name - parent_id - position is it alright to have the Category model act_as_tree and for each level act_as_list? class Category < ActiveRecord::Base acts_as_tree :order => :position acts_as_list :scope => :parent_id end Thanks, Peter
2006 Jul 06
4
Oracle HR on Rails
Interesting read...apologies if it has been posted already. http://www.oracle.com/technology/pub/articles/saternos-rails.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060706/619e650a/attachment.html
2006 Jul 13
2
Nested Data
...d bookstores. Within that table are columns such as bookstore name, city, state, and zip code. What I''d like to do is display the City and then every store name for that city underneath it. i.e. City - Store 1 - Store 15 Another City - Store 2 - Store 5 etc. I''ve seen act_as_tree but I don''t know if it''ll help me as I''m just using one table here. Is there a rails way to do what I want? Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Jun 12
0
Using migration to import data?
Hi all, I have a large set of data to load, many of which are part of a big act_as_tree model. Right now, I am testing the creation with migration for the first layer of the tree but for the second layer, I have to know the ID of the parent_ID. So far, it is easy because I can guess it by looking at the insertion order, but I was wondering if there are any better way to do this.....
2006 Mar 11
0
How to best handle a hierarchy
...- in fact I only picked up the books a couple of days ago and already I''m thinking of porting some of my apps across! At present I''m working on a relatively simple application that does online testing for schools and colleges. The school can create a hierarchy using the "act_as_tree" functionality in Rails. They can also create "Exams" and "Students". These can be "linked" to any part of the tree, the idea being that an Exam is visible to any students at the same level or below it in the tree and that Students can only see exams that are...
2005 Dec 25
1
belongs_to loop?
Hi all, I''m having two tables: contacts (belongs_to) company details. The problem is this. In the company table I have a field "pid" (parent id). Which relates a company (being a possible subsidiary) to it''s parent e.g. a bigger enterprise. Does the belongs_to work when related to the same model (table). The relation is upwards only for now. I don''t want
2005 Apr 19
3
Rails 0.12.0 / ActionWebService 0.7 bug?
Hi, Just upgraded to Rails 0.12.0 and ActionWebService 0.7. I''m using the special struct class to create custom structs. In version 0.6.2 I was able to receive nil values for members of the struct. As of version 0.7 all nil values seem to be rewritten to some default value (empty string for string member, 0 for int etc.), which breaks my application. Is this a bug or a feature?
2006 Mar 07
2
webrick RoutingError
...he correct command (I already deployed several rails apps successfully before). I checked that the database is created with the correct tables. I ran script/generate scaffold and got all the files correctly created. Why is it not working? Could it be a problem of rails version? I am trying out act_as_tree in the model definition. The complete error: Processing Base#index (for 127.0.0.1 at Tue Mar 07 19:16:58 CET 2006) Parameters: {} ActionController::RoutingError (Recognition failed for "/keywordeditor"): /home/sun-000/SwissProt/iphan/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib...
2005 Oct 19
3
Finding all parents of acts_as_tree relationship
I''m using acts_as_tree to maintain a hierarchy of categories (each top-level category can contain multiple categories and each sub-category can contain multiple sub-categories, etc.). I want to be able to find all parents of a particular category. I realize that I can use @category.parent or even @category.parent.parent to move up in the hierarchy, but I need this to happen dynamically
2010 Mar 16
3
collection_select has_many
hi i have two models: GeoRegion & GeoRegionSub which have a has_many relation to each other. how can include the has_many relation in the collection_select helper? i want to have that dropdown where the parent is in black and the children indented. <%= collection_select :dl,:parent_id, GeoRegion.all.????, :id, :title %> thx -- You received this message because you are subscribed
2008 Apr 23
0
self referential (n-n relationship) belongs many controller
...o :tasklink, :class_name => ''Task'', :foreign_key => ''tasklink_id'' end ---------------------------------------------------------------------------------------- I have to link the tasks in a kind of auto join in nn relationship (1-n can be easily solved with act_as_tree) so ... <b>THE PROBLEM :</b> I ve my problem in the create and update of task controller : rows in table links are not created (or badly : task_id is ok, but tasklink_id is KO) Here is my tasks_controller : -------------------------------------------------------------------------...
2006 Jun 08
7
How to make an OSX Finder in rails/AJAX?
I need to make a category browser that would allow nested categories. Is there any receipe on that? Currently, I use the :onchange event from one of the form element to update the first select (out of 4-5 selects), but I dont know how to elegantly reset all the child selects if I change the value from the first. All the categories are fetched from the DB and I would like a