goncalossilva/acts_as_paranoid — pull request #136 by davidqhr (2014-04-16 07:26:24+00:00)
Title: fix recover counter_cache does't change bug

Hi,

In my project, I found a strange phenomenon.

```ruby
class A < AR:Base
has_many :bs, dependent: :destroy
attr_accessible :name
end

class B < AR:Base
belongs_to :a, counter_cache: :counter
attr_accessible :name
end

a = A.create!(name: 'a')
100.times do
a.bs.create!(name: 'b')
end

a.counter
# => 100

a.destroy
a.counter
# => 0 No problem

a.recover
a.counter
# => 0 I think it's a bug

a.destroy
a.counter
# => -100
```

That is because destroy method is wrapped by destroy callbacks
buy default recover callbacks has no logic about the counter_cache
CR please!
Thank you

- david