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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -