ar-async-counter-cache 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/ar-async-counter-cache.gemspec +2 -2
- data/lib/ar_async_counter_cache/active_record.rb +3 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ar-async-counter-cache}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Gibralter"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-07}
|
13
13
|
s.description = %q{Increment ActiveRecord's counter cache column asynchronously using Resque (and resque-lock-timeout).}
|
14
14
|
s.email = %q{aaron.gibralter@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -50,14 +50,14 @@ module ArAsyncCounterCache
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
after_create(method_name)
|
53
|
-
# Define
|
54
|
-
method_name = "#{base_method_name}
|
53
|
+
# Define after_destroy callback method.
|
54
|
+
method_name = "#{base_method_name}_after_destroy".to_sym
|
55
55
|
define_method(method_name) do
|
56
56
|
if parent_id = send(parent_id_column)
|
57
57
|
ArAsyncCounterCache::IncrementCountersWorker.cache_and_enqueue(parent_class, parent_id, column, :decrement)
|
58
58
|
end
|
59
59
|
end
|
60
|
-
|
60
|
+
after_destroy(method_name)
|
61
61
|
end
|
62
62
|
|
63
63
|
def async_counter_cache_column(opt)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ar-async-counter-cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Aaron Gibralter
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-07 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|