From: Wizumwalt@... Date: 2006-04-05T06:53:46+09:00 Subject: select in rhtml I'm trying to get a select box of categories to appear in my items views after I created everything using generate scaffold, but I can't get the categories to appear in my forms. class ItemsController < ApplicationController def new @item = Item.new @category = Category.find_all end .... class Item < ActiveRecord::Base belongs_to :category end class Category < ActiveRecord::Base has_many :items end I found some news postings that said the select tag in my _forms.rhtml was 'object', 'attribute', and 'list_items', but I've tried several combinations and can't get this right. This is my ~/app/views/items/_form.rhtml
<%= select 'item', 'name', 'category' %>