similar to: Newbie: Display hierarchical Records in a view

Displaying 20 results from an estimated 1000 matches similar to: "Newbie: Display hierarchical Records in a view"

2006 Aug 06
1
Newbie: populate 2nd dropdown list based on user''s selection in 1st dropdown list
Hi, I am creating a form that a user can post a message based on his selection on category and subcategory. (A category has many subcategories.) How do I dynamically populate subcategory dropdown list when user chooses a category from category dropdown list? Thanks in advance. -- Best regards, Ming Ma
2006 Apr 15
8
Inheritance in Rails - I need some help
I''ve got a model, "category" and another model "subcategory." Each subcategory belongs_to a category, and a category has_many subcategories. What I need to do is set it up so that I can search Category and Subcategory with one .find call. So: Category.find(:all, <etc) will find categories and subcategories. Now, I believe this can be done by making
2006 Mar 30
5
Heeelp - no idea what''s going wrong.
I''m working on a simple CMS. The main data type are "listings" a listing habtm (has_and_belongs_to_many) categories and subcategories. Subcategories belong_to categories. Subcategories are basically the same as categories, but they are treated differently in a few situations. The problem is, I can''t seem to write the view/controller/model code that allows me to
2006 May 07
2
Category and subcategories in database
I have a project I''m trying to decide if I want to use rails for. I''m new to rails, so I''m not sure how easy it would be to implement something like this using ActiveRecord. Here''s the situation: Category > subcategory > subcategory > product Category > subcategory > product Some categories will have many subcategories, others few. I want
2006 Apr 11
2
Finding items from two models - then merging them
I have a model, listings. Listings habtm categories and subcategories, which are seperate models. What I want to do is search categories for certain items, like so: @categories = Category.find(:all, :conditions => ["name LIKE ?", "#%{:search_string}%" and subcategories for the same: @subcategories = Subcategory.find(:all, :conditions => ["name LIKE ?",
2008 Apr 01
1
Navigation Problems
Hi, I am having problems with my page. I have a banner and navigation bar in controller_name.rhtml in app/views/layout. Can someone please help? Thanks In the navigation bar, I have the following links: Category1 Sub-Category1 Sub-Category2 Sub-Category3 Sub-Category4 Sub-Category5 Sub-Category6 In the main content, I have the following links: Sub-Category1 edit delete
2009 Oct 15
10
AJAX - how to have multiple select form sets implemented?
hi, there :) Consider a blogging application whereby a user is trying to add a new blog. He/she has to select a category. Upon selecting a category from a drop down box, a new sub categories drop down box will be created (hence an AJAX call). Got this implemented and it''s ok. Now, let''s assume that a given blog can have multiple categories (and subcategories). For example, a
2008 Dec 25
5
One question about Dynamic Select Menus
Hi all, Merry X''mas first :-) I have "Product","Category","Subcategory" 3 Model, and when new "Product", I want to use "Dynamic Select Menus" just like Ryan mentioned in http://railscasts.com/episodes/88-dynamic-select-menus I have everything down. But when I visit the js file, I got following error Showing
2006 May 23
7
has_and_belongs_to_many question
Hello, I am trying to make the "switchover" to programming my apps in Rails and have a question about database structure. In the past i would structure a many to many like this: categories ---------------------------------------------------- | id | name | ---------------------------------------------------- 1 Some Category 2 Another
2006 Mar 31
7
Checkboxes expand to show new options when checked?
I''m writing a simple CMS where every item ("listing") HABTM categories and subcategories (which themselves belong_to a category). What I''m trying to do now is create a UI effect for listing creation: when you go to create a listing, only the possible categories will be shown, but when you select a category a set of new categories will be displayed like so: Lions
2006 Apr 07
13
Pop up menus - any ideas?
I''ve got a menu in which I have all of my categories as links. Each category also has subcategories. I want to set it up so when you mouse over the category the subcategories will pop up (to the right of the main list, but that''s just CSS). This is what I have so far: <% for category in @categories %> <a href="#"
2006 Aug 02
3
using migration--newbie
Hi all, (I''m new with RoR) I''m using a migratio to import data into a database but nothing is being happens. I''m importing strings from a parsed file. this is what I have: controller: class UploadController < ApplicationController def create table = { } params[:localized_string][:data].each_line do |line| if line =~ /^\s* " (.*?) "
2006 Jul 06
17
Linux distros
Is there any particular distro that seems to be most used among RoR developers on Linux? Any that might provide better support somehow for development of RoR apps? -- Posted via http://www.ruby-forum.com/.
2006 Jul 13
2
Simple dropdown menu
Hi, I''m quite new to this language and I''m having trouble finding out simple things like a dropdown menu in rhtml. I know I have to use <% select_tag %> but I''ve read lots of different ways to put in the options so I''m a bit confused. Options are hard-coded for the menu I''m trying to create so no database is involved! Thanks v much! Bex --
2006 May 12
2
Has many through join table issues
I''m trying to wrap my caffeine soaked brain around has_many :through following along at: http://rails.techno-weenie.net/tip/2005/12/23/teaching_your_blog_model_new_tricks_with_has_many_through I think my models are a little more complex than what fits this narrative. I have a directory of members, each member can belong to multiple categories. The category table references itself
2009 Mar 11
1
Reshape question.
This hopefully is trivial. I am trying to reshape the data using the reshape package. First I read in the data: a2009 <- read.csv("Total2009.dat", header = TRUE) Then I trim it so that it only contains the columns that I have interested in: m2009 <- melt(a2009, id.var=c("DayOfYear","Category","SubCategory","Sku"),
2006 Jul 13
10
Book Question on RoR
Hi there, I am a newbie and interested in learning Ruby on Rails. I see there are 2 books out there: Ruby for Rails Ruby techniques for Rails developers David A. Black and Agile Web Development with Rails : A Pragmatic Guide (Pragmatic Programmers) Dave Thomas, David Heinemeier Hansson, Andreas Schwarz, and Thomas Fuchs Which one should I get? "Agile Web Development with Rails"
2006 Feb 13
2
categories and admin/categories - different controllers and templates?
Is there some way to have these two sets of URLs use totally different controllers and templates? categories/list categories/show/1 admin/categories/list admin/categories/edit/1 admin/categories/destroy/1 admin/categories/update/1 Besides, of course, using different controller names ;). The first URL is publicly accessible, while the second contains admin functions. Also, with the second,
2006 Aug 02
1
Ordering the many in a many to one relationship
I have a many-to-one relationship between a model named Category(one) and a model named Brands (one). How can I get ActiveRecord to order the brands by the "name" attribute? This seems like a simple question and I can think of long ways around it but there has go to be a way to do this by accessing @category.brands . Can anyone help? I tried the code below in the controller but it
2006 Jul 09
1
REST Interface
Is the REST Controller (for calling APIs through the REST interface) already built-in ?? Or, I have to generate one -- generate controller rest ?? MSN id: ICEMANyears@netscape.net -- Posted via http://www.ruby-forum.com/.