I just want to have a dropdown menu in which all the rows of the table will be selected. How do I achieve this? Say I have a Student model, and I want the name property to be displayed in the selection.
Thanks in advance.
Use select , for example:
select(:model, :attribute, Student.all.collect {|p| [ p.name, p.id ] })
Here is some information on using collection selection ...
http://www.fmhcc.com.au/ruby/rails/using-collection_select-in-rails/