Multilevel category showing for select options in rails -


currently using grouped_options_for_select show category in rails project. code below

collection = ["north america",[["united states",["inner"]],["canada",["inner"]]]]  <%= select_tag(::id_methods, grouped_options_for_select(collection, selected_key = " ", prompt = nil)) %> 

this output below

north america united states inner  canada  inner 

but want output below

north america  united sates   inner  canada   inner 

how can this?

try this:-

collection = ["north america",["united states",["inner"]],["canada",["inner"]]]  <%= select_tag(:id_methods, grouped_options_for_select(collection, selected_key = " ", prompt = nil)) %> 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -