# ActivRecord APIs for DB transactions

**URL:** <https://www.ruby-forum.com/t/activrecord-apis-for-db-transactions/174276>\
**Category:** Rails\
**Created:** [August 24, 2009, 9:18am UTC](https://www.ruby-forum.com/t/activrecord-apis-for-db-transactions/174276 "2009-08-24T09:18:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@karthik](https://www.ruby-forum.com/u/karthik)\
**Post date:** [August 24, 2009, 9:18am UTC](https://www.ruby-forum.com/t/activrecord-apis-for-db-transactions/174276/1 "2009-08-24T09:18:59Z")

</div>

Hi guys

Can i get some reference for studying all ActivRecord API related to  
DB transactions.

–  
Karthik.k  
Mobile - +91-9894991640

---

<div class="post-metadata">

**Author:** ![karthik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@karthik](https://www.ruby-forum.com/u/karthik)\
**Post date:** [August 24, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/activrecord-apis-for-db-transactions/174276/2 "2009-08-24T14:26:55Z")

</div>

Hopefully this would help :

> **[ActiveRecord::Base](https://api.rubyonrails.org/classes/ActiveRecord/Base.html)**
>
> Active Record Active Record objects don't specify their attributes directly, but rather infer them from the table definition with which they're linked.

---

<div class="post-metadata">

**Author:** ![karthik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@karthik](https://www.ruby-forum.com/u/karthik)\
**Post date:** [August 24, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/activrecord-apis-for-db-transactions/174276/3 "2009-08-24T15:57:09Z")

</div>

Another good link:

> **[ActiveRecord::Transactions::ClassMethods](https://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html)**
>
> Active Record Transactions Transactions are protective blocks where SQL statements are only permanent if they can all succeed as one atomic action.

Andrew

---

<div class="post-metadata">

**Author:** ![karthik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@karthik](https://www.ruby-forum.com/u/karthik)\
**Post date:** [August 24, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/activrecord-apis-for-db-transactions/174276/4 "2009-08-24T15:57:44Z")

</div>

It is also good to know that the “save” and “destroy” methods already  
use transactions to ensure before and after callbacks.
