Forum: Ruby on Rails select in a partial

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
82a578052d304559f15180bdf56555d2?d=identicon&s=25 Tarscher (Guest)
on 2007-02-01 10:47
(Received via mailing list)
Hi all,

I use a drop down list (select) in a partial.

<%= select('treeview', 'kind', %w{ Club Ploeg Tak }) %>

The partial is called treeview and it has a variable kind. If
treeview.kind matches or Club or ploeg or Tak then one of them should
be selected.

Since select expects a instance variable this doesnt't seem to work. I
already tried
@temptree = treeview and then

<%= select('temptree', 'kind', %w{ Club Ploeg Tak }) %>
but Club is always the selected value.

Since I'm really stuck here all help is greatly appreciated.

This topic is locked and can not be replied to.