I'm working on populating this dropdown and finding myself having some 
trouble even though in theory it would be pretty simple. I'm used to rails 
4 and we are using rails 3 on this project as well as haml which I'm 
familiar with, but not super comfortable with.

*_extra_fields.html.haml*
= form.input :category_id, as: :select, collection: Category.all.map{|x| 
[x.name,x.id]}, input_html: {:style => "width:300px"}, :include_blank => 
true
= form.input :sub_category_id, as: :select, collection: 
@package.category.sub_categories.map{|x| [x.name,x.id]}, input_html: 
{:style => "width:300px"}, :include_blank => false


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/dbeb3db3-fb88-4f2a-9cbf-296166342359%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to