acts_rateable 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ module ActsRateable
21
21
  includes(:count).group('ar_ratings.id').order("ar_ratings.#{column.downcase} #{direction.upcase}")
22
22
  }
23
23
 
24
- after_save do
24
+ after_create do
25
25
  ActsRateable::Rating.where({resource_id: self.id, resource_type: self.class.base_class.name}).first_or_initialize.save #if !rates.empty?
26
26
  ActsRateable::Count.where({resource_id: self.id, resource_type: self.class.base_class.name}).first_or_initialize.save #if !rates.empty?
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module ActsRateable
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_rateable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-24 00:00:00.000000000 Z
12
+ date: 2013-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -257,3 +257,4 @@ test_files:
257
257
  - test/dummy/spec/factories/user.rb
258
258
  - test/dummy/spec/models/acts_rateable_spec.rb
259
259
  - test/dummy/spec/spec_helper.rb
260
+ has_rdoc: