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

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

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

Need help in packaging app using TideSDK on Windows -