# Transaction Question

**URL:** <https://www.ruby-forum.com/t/transaction-question/114765>\
**Category:** Rails\
**Created:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/transaction-question/114765 "2007-09-17T13:25:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/0ea827/32.png) [@Meech](https://www.ruby-forum.com/u/Meech)\
**Post date:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/transaction-question/114765/1 "2007-09-17T13:25:22Z")

</div>

I have a custom class defined within the models directory. The class  
pulls data from many models and aggregates it. It also has a save  
method which writes data to multiple models.

I’d like to wrap the save in a transaction, but the class is not a  
descendant of ActiveRecord. The class really does not need all of the  
ActiveRecord overhead, so how would I manually wrap this in a  
transaction??
