Flowdock
method

transaction

Importance_1
v3.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::AssociationCollection
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
Show source
Register or log in to add new notes.