Module: AfterCommit

Defined in:
lib/after_commit/active_record.rb,
lib/after_commit/after_commit.rb,
lib/after_commit/connection_adapters.rb

Overview

Based on the code found in Thinking Sphinx: ts.freelancing-gods.com/ which was based on code written by Eli Miller: elimiller.blogspot.com/2007/06/proper-cache-expiry-with-aftercommit.html with slight modification from Joost Hietbrink, and DeLynn Barry. Change to gem packaging for use with Merb/AR by Kane Baccigalupi.

Defined Under Namespace

Modules: ActiveRecord, ConnectionAdapters

Class Method Summary collapse

Class Method Details

.committed_recordsObject



2
3
4
# File 'lib/after_commit/after_commit.rb', line 2

def self.committed_records
  @@committed_records ||= []
end

.committed_records=(committed_records) ⇒ Object



6
7
8
# File 'lib/after_commit/after_commit.rb', line 6

def self.committed_records=(committed_records)
  @@committed_records = committed_records
end

.committed_records_on_createObject



10
11
12
# File 'lib/after_commit/after_commit.rb', line 10

def self.committed_records_on_create
  @@committed_records_on_create ||= []
end

.committed_records_on_create=(committed_records) ⇒ Object



14
15
16
# File 'lib/after_commit/after_commit.rb', line 14

def self.committed_records_on_create=(committed_records)
  @@committed_records_on_create = committed_records
end

.committed_records_on_destroyObject



26
27
28
# File 'lib/after_commit/after_commit.rb', line 26

def self.committed_records_on_destroy
  @@committed_records_on_destroy ||= []
end

.committed_records_on_destroy=(committed_records) ⇒ Object



30
31
32
# File 'lib/after_commit/after_commit.rb', line 30

def self.committed_records_on_destroy=(committed_records)
  @@committed_records_on_destroy = committed_records
end

.committed_records_on_updateObject



18
19
20
# File 'lib/after_commit/after_commit.rb', line 18

def self.committed_records_on_update
  @@committed_records_on_update ||= []
end

.committed_records_on_update=(committed_records) ⇒ Object



22
23
24
# File 'lib/after_commit/after_commit.rb', line 22

def self.committed_records_on_update=(committed_records)
  @@committed_records_on_update = committed_records
end