similar to: control for acts_as_tree structure

Displaying 20 results from an estimated 1000 matches similar to: "control for acts_as_tree structure"

2006 Jun 17
5
Having trouble listing tiers of categories
I have categories and sub-categories in a table called "categories". Every row has a "parent" field to note if the entry is the sub-category of another (never goes deeper than 1 level). So there might be something like this: id | name | parent 1 Dog 0 2 Pug 1 3 Siamese 5 4 Shih Tzu 1 5 Cat 0 6 Wiener Dog 1 7 Persian
2006 Mar 12
3
Displaying a Tree
Hi, Just a request for comments and ideas really. I need to display a Tree so that users can easily navigate to and from the various branches. I''m not really sure how best to do this, so I thought I''d ask here in case anyone had any ideas... Thanks in advance! -- Posted via http://www.ruby-forum.com/.
2006 Feb 23
1
Anyone done a "File Browser"? Like a free StrongSpace?
Hey all, Does anyone know of an existing project that acts as a file broswer for files/directories on the server. I need to implement something for my students to be able to access their unix home drives on our server via the web. It doesn''t sound that hard to do the actual file listing and accessing in ruby. Authenticating the users could be tricky (PAM?). It could be done, but
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
2006 Mar 29
4
Why doesn''t Rails 1.1 have all the Script.aculo.us 1.6 files?
Why aren''t builder.js, slider.js, and scriptaculous.js part of the Rails 1.1 javascripts? rab:javascripts $ pwd /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/html/javascripts rab:javascripts $ ls -l total 288 -rw-r--r-- 1 root wheel 148 Mar 28 08:56 application.js -rw-r--r-- 1 root wheel 28036 Mar 28 08:56 controls.js -rw-r--r-- 1 root wheel 23613 Mar 28 08:56 dragdrop.js
2008 Jul 11
1
prototype.js breaks treemenus from pear HTML_TreeMenu in safari
hi all i see a very strange behavior in safari when using prototype.js and the pear HTML_TreeMenu to reproduce get prototype.js (http://www.prototypejs.org/assets/ 2008/1/25/prototype-1.6.0.2.js) and treemenu.js (http://cvs.php.net/ viewvc.cgi/pear/HTML_TreeMenu/TreeMenu.js?revision=1.22). and test the following html with safari on mac or windows (http:// www.apple.com/safari/download/)
2006 Mar 18
1
user engine redirect configuration help
Hello, I am using the User Engine in a typical way. When an unathenticated user attempts to access a protected area of the site it works fine unless the the controller has been defined in a module. i.e. When I try and access localhost/admin/roles/list as an unathenticated user I get redirected to localhost/admin/user/login insted of the correct location: localhost/user/login. I''ve
2008 Nov 17
7
super global dummy method for gettext + rails 2.2
Hi, since rails 2.2 doesn''t work with gettext anymore I decided to use a gettext dummy method until the gettext team relases a working version for rails 2.2. My application doesn''t need any i18n support right now and this way i figured it would be very easy to integrate gettext later. Just setup the plugin and go. So I need a method called _ which is available in alle models,
2006 Mar 31
3
params vs @params
Is there a difference in the way that params[] and @params[] are handled? Is the ''handling'' done by Ruby or Rails? A pointer to the relevant documentation would be sincerely appreciated. Or just an answer would be ok too ;-) Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Apr 04
3
Keeping javascript in the <head>
Given that Rails has built in ways to do almost everything else :) , is there a way to keep view specific javascripts inside the head tag of a layout without having to include that javascript on every page? -- Marlon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060404/65e9bb6d/attachment.html
2010 Jan 31
6
Action path - syntax error, unexpected tIDENTIFIER, expecting ')'
I have a user controller with login as action. When I access the index.html.erb file via application.layout file. I get a error on the login link on the index.html.erb page. I think I am having dfifficulty in setting up path to an action or even understanding how to set REST path properly. Can someone please help me. Here is the error on the home page:
2009 Oct 13
3
Site map
Hi All... I am using generate_sitemap plugin to generate sitemap. It goes very well and creates sitemap as well. My problem is I want some links that are coming from vender/plugins. Can any one tell me how to get those links??? Thanks all... -- Posted via http://www.ruby-forum.com/.
2006 Apr 04
4
Aggregating two objects of the same type
I would like to have a customer that has references to two addresses, a billing address and a shipping address. In a non-rails environment I would have two keys in the customers table, billing_address_id and shipping_address_id to reference the addresses. It appears that ActiveRecord expects the parent id to reside in the child table, regardless of whether the relationship is one-to-one or
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 May 30
2
acts_as_tree, acts_as_list and is invincible (help!)
So I have the following model class Topic < ActiveRecord::Base belongs_to :topic has_many :topics, :order => :position acts_as_tree :order => :position acts_as_list :scope => :topic_id end that I use for a site''s navigation. Everything (list, create, edit, even the drag&drop sort) works fine, except the destroy function, which the vanilla version def destroy
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 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
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