Listboxes in forms

Hi,

I have a form with a set of fields. All these fields belong to a table
called Textmaze. One of the form fields is a list box. This list box
gets it's values from an existing table called Scenario in the
database. On submission of the form, it should create a record in a
table. Connection between these two tables looks like this:

class Textmaze < ActiveRecord::Base
  belongs_to :starting_scenario,
        :class_name => "Scenario",
        :foreign_key => "starting_scenario"

From your description, it seems the problem is in the form action

method inside your controller. By the way, yes, you should code the
option value as <option value="<%= scenario.id %>">. This will provide
the key for doing a find on Scenario.

The error is saying you supplied a string, rather an instance of
Scenario, probably as a parameter to something. I would check your code
that deals with Scenario. If you get stuck post the code up here.

-Paul