controller code looks something like:
class testController < ApplicationController
def test
@categories= Category.find_all
end
end
use
<%= options_from_collection_for_select @categories, 'id', 'name' %>
to populate the select box
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment