I have two tables Faq and FaqCategory, Faq has an
association :category (has_one) to FaqCategory. Category has :id
and :title fields.
I want to put an options selection helper into my _forms.html
(scaffolded) which will provide a list of categories.
I tried this one but it didn''t work for me:
<%= select("faq", "category",
FaqCategory.find_all.collect {|p|
[ p.title, p ] }, { :include_blank => true }) %>
After selecting an option I got this error:
FaqCategory expected, got String
app/controllers/faq_editor_controller.rb:35:in `update''
script/server:48
What did I miss? What''s wrong?
Gábor