Bug or Feature / @var.save

Hi all,

I have just a little problem. I want to save an object back to my
database table.

if I do itlike that:

e = Event.new(params)
e.save!

e.id returns the correct id of the created db entry

however if I do it like that.

e = Event.new(params).save!

e is just true (which is correct, but I hoped I'll get back the object)

Can you tell, I am still not very familiar with Ruby :-/

Yes, I can tell. You will find using Rails much easier and more productive
if you actually know Ruby. Go learn it.

How can I do this in one line?

(e = Event.new(params)).save!

Thanks for a hint
Karl

--Greg