before_save returning false does not roll back transaction -- save returns true

When a save of a record is going to cause more than one record to be saved because they have been associated with each other, if one of the records has a before_save callback which returns false, then that record is not saved (which is correct) but the records saved up to that point are not rolled back.

e.g.

foo = Foo.new bar = Bar.new foo.bars << bar foo.save

If bar has a before_save call back that returns false, foo will get saved and the foo.save call will return true.

Perhaps that is what should happen but I was expecting the whole transaction to get rolled back.

I opened a bug report on this but it was closed. I need to supply a testcase. Thats fine... But I'd like first to know if this is bug or maybe a bug or definitely not a bug.

Thank you for you time, Perry

What happens when you try to raise an exception in before_save callback ?