For some unknown reason my code snippet above didn't show the key line 
correctly.  The important line is the next to last line in the snippet 
below:


> 
> @simulation = Simulation.new(sim_hash)
> @simulation.user_id = current_user.id
> @simulation.save!   #need to save to get the id from the database
> 
> buf = Buffer.new(buf_hash)
> buf.name='Queue1'
> buf.simulation_id = @simulation.id
> buf.save!


Reply via email to