ruby on rails - How do I populate these fields? -


if go website https://www.cameralends.com/?utm_source=hackernews can click various drop downs. i'd know how populate fields data?

e.g. there different camera models can choose etc...

i know using code like:

<% = a.select :categories, category.all.collect {|c| [c.name, c.id]}, :include_blank => true', :multiple => "multiple" %> 

will display them, how populate categories initially?

if need add default set of values application, should use seeds.

see railscast learn more them.


Comments

Popular posts from this blog

Need help in packaging app using TideSDK on Windows -

java - Why does my date parsing return a weird date? -

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -