It's bad style to include database lookups in your view code. Pass the collection as an instance variable set in your controller, e.g.,
# in controller def new @hotels = Hotel.find(:all, :order => :name).collect { |h| [h.name, h.id] } end
# in view <%= select("hotelmembership", "membership", @hotels, { :include_blank => FALSE }) %>
I think you should be able to use collection_select instead
# in controller def new @hotels = Hotel.find(:all, :order => :name) end
# in view <%= collection_select("hotelmembership", "membership", @hotels, :id, :name, { :include_blank => FALSE }) %>
Michael Glaesemann grzm seespotcode net