Transaction Question

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??

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs