Select_tag

in my controller

@cursos = Curso.find_all

in my view i’m trying to do a select_tag with the results @cursos, using
a helper

select_tag “name” options_for_select(@cursos) --------> not works
select_tag “name” @cursos --------> not works

how to do it, using the helper?

tks

Fernando wrote:

in my controller

@cursos = Curso.find_all

in my view i’m trying to do a select_tag with the results @cursos, using
a helper

select_tag “name” options_for_select(@cursos) --------> not works
select_tag “name” @cursos --------> not works

how to do it, using the helper?

tks

Maybe you missed the commas?

<%= select_tag(“name”, @cursos) %>

should work.