Topic: i want to fetch the data's from the datanase. it display in combo box
i want to fetch the data's from the datanase. it display in combo box .
but i am very new to ROR. so i don't know what are all the steps to do this. like where i have to put in controllter or in rhtml file.
Can any one tell step by step process, if u can. please its very urgent.
my database name is : panles
it contain - id,name.
combo box i want to display - panel name.
controller name is - home
rthml file is - index.rhtml
right now i have done index.rhtml only, rest i don't know how to do
@panles = panel.find(:all, :panel => "name")
collection_select(:panel, :name, @panels, :id, :name)
but it shows the error.
please help me asap