Flowdock
method

transaction

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveRecord::Associations::AssociationCollection

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

These similar methods exist in v6.1.7.7:

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.