similar to: Many to Many Category structure with itself

Displaying 20 results from an estimated 1000 matches similar to: "Many to Many Category structure with itself"

2006 Feb 08
2
URL rewriting
Here is the scenario I am trying to achieve. Basically, I want to run the action "show" from my controller, without adding the "show/id". Standard: http://www.domain.com/controllerName/show/id I would like: http://www.domain.com/controllerName/randomstring (where randomstring is a field in my model/table, that is equivalent to a GUID -> and unique). I''m confused
2006 Mar 29
4
Scaffold generator: create vs. new
Can anyone supply me with a simple, succinct explanation of what the difference is between the "new" controller and the "create" controller that the scaffold generator produces? I run: > script/generate scaffold modelname controllername And now I need to do some work inside the controllername.rb file. For example, pulling a list from another database table to supply
2006 Feb 07
5
homepage instead of welcome page?
Got a noob question for ya... When I visit http://localhost:3000/ I get the nice "Welcome to rails" page. To get to a controller I have to go to: http://localhost:3000/controllername What if I don''t want the welcome message and want / to resolve to a controller? How do I set that up? Thanks, Dave -- Posted via http://www.ruby-forum.com/.
2006 May 02
1
Accessing Parameters - Params (nil)
I''m trying to render a component that pulls information based on a parameter that is passed by a link_to item, but my params object is nil for the following code in the controller: records = ControllerName.find(params[:id]) but the error page also has this: Parameters: {"id"=>"7"} I''ve tried to access it (in the controller) using: variable =
2006 Jan 25
4
html special char conversion
I''ve stucked to such problem: I have html entities in database, after using scaffold I''ve got these chars not converted (I have strictly " and & in page source). It is what I need, but after making ./script/generate scaffold modelname controllername (recreating controller) I''ve got all special chars converted into entities like (&quot and others). How can
2006 Mar 10
8
multiple sub categories (parent-child)
hi. base from the cookbook example, where each categories can have many recipes, id like the categories to have multiple sub categories, unlimited levels. please show some code, as i am new to Ruby and Ruby On Rails. thanks -- Posted via http://www.ruby-forum.com/.
2006 May 28
1
Changing module name - help!
When I started developing my application I grouped my controllers in the followin g fashion: User::ControllerName. Now I''ve realized that the ''User'' module is a misnomer for my current controllers and I need to use the User module for something else, so I decided to change the controllers in the ''User'' module to ''Data''.
2006 Feb 01
3
Testing components
I''m using template components to modularize an application I''m working on and am really happy with the way it''s going. Unfortunately, all my attempts at writing functional tests for them fail. Trying to duplicate my normal controller tests I have: require File.dirname(__FILE__) + ''/../test_helper'' require File.dirname(__FILE__) +
2006 May 09
2
what are all these methods?!?! :)
I''ve been happily riding the Ruby/Ruby on Rails learning curve .. I bought the pickaxe book, first and beta second editions of the agile book and i''ve been using the api.rubyonrails.com but i''ve come across something which as stumped me I''m fooloing around with :acts_as_tree in the console and I instantiated a new tree object and went to use the readline
2006 Feb 12
6
Including another helper
I need to include another helper module apart from the normal two (ApplicationHelper and [controllername]Helper). The inclusion needs to be dynamic and based on external parameters (ie what helper that get included differ from request to request). Is it possible? How? /Marcus
2010 Apr 03
0
Deployment problem with apache + fastcgi
Hi! I''m from Russia. It''s my first post in this forum. Execuse for my bad language, but i hope you''re help me! I try to deploy rails app on apache + fastcgi hosting. .htaccess file contents: AddHandler fcgid-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA]
2007 Feb 26
15
drbspec - "no server running"
At times I''ve gotten the message "No Server Running" from drbspec with my rails app. The thing is, the drb server certainly is running! This happened a few times with my model specs. I''m not sure exactly what the problem was there - I believe I was loading up fixtures that didn''t exist. I was calling fixtures :singular_table_name as opposed to
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,
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 19
3
Associated child records not created on creation of a parent.
I am trying to create a record with association. Within the create method, I would also like to pre-populate dependent (has_many) records from a template in the database. The child records are <u>mysteriously rolled back </u> if I insert them in a loop. If I try to insert a single child record, it works.I have read the books and tried to google my way out of this but am at a dead
2005 Jul 25
2
acts_as_tree and traversing parent/child relationships
I am working on an Rails application that uses a pretty complex category structure through out the site. I have defined a table to house all the info and a FK to reference parents within the table CREATE TABLE categories ( id int(11) NOT NULL auto_increment, name varchar(50) NOT NULL, parent_id int(11) default NULL, constraint fk_category_id foreign key (category_id) references
2006 Feb 02
3
acts_as_family_tree
For a project that I am working on I need to have a family tree. This means that instead of having one parent each item has at most two. As far as I know acts_as_tree only allows one parent_id. Any suggestions on how to make a "acts_as_family_tree" ? Thanks, Mark -- -------------------------------------------------------------------- I am Mark Daggett and I approve this message.
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.
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
2009 Sep 14
5
Expecting field value and getting record
The following short console session illustrates the problem: Loading development environment (Rails 2.3.2) >> topic=BlogTopic.find(4) => #<BlogTopic id: 4, parent: 2, topic: "Topic Four", created_at: "2009-07-13 21:31:22", updated_at: "2009-09-14 00:37:29"> >> topic.inspect => "#<BlogTopic id: 4, parent: 2, topic: \"Topic