What do you want the user to see in the drop-down? What do you want
stored in the xyz_id field of your @xyz object? I'm having a hard time
understanding the .collect call in there.
What do you want the user to see in the drop-down? What do you want
stored in the xyz_id field of your @xyz object? I'm having a hard time
understanding the .collect call in there.
What do you want the user to see in the drop-down? What do you want
stored in the xyz_id field of your @xyz object? I'm having a hard time
understanding the .collect call in there.
Does this run without error?
f.select("xyz_id", @my_arr, {:prompt => "opt1"})
Cheers,
-Roy
if I do that I get the following error
undefined method `xyz_id' for #<Xyz:0x4304cfc
The problem is solved.
The problem occured due to the first 2 parameters. For example, this
doesn't work
select("abc", "abc_id" .....)
Roy Pardee wrote:
> What do you want the user to see in the drop-down? What do you want
> stored in the xyz_id field of your @xyz object? I'm having a hard time
> understanding the .collect call in there.
Then something is fundamentally scewed: why are you trying to edit
xyz_id if Xyz doesn't have xyz_id column? (also this would probably be
a lot easier to follow with 'real' class/column names)