method
transaction
v6.1.7.7 -
Show latest stable
- Class:
ActiveRecord::Associations::CollectionAssociation
transaction(*args)public
Starts a transaction in the association class’s database connection.
class Author < ActiveRecord::Base has_many :books end Author.first.books.transaction do # same effect as calling Book.transaction end