voteable_mongoid 0.6.1 → 0.6.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/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.6.2
2
+ * Fix bug: use before_create instead of after_after_initialize
3
+
1
4
  == 0.6.1
2
5
  * Set counters and point to 0 for uninitialized voteable objects in order sort and query
3
6
 
@@ -1,3 +1,3 @@
1
1
  module VoteableMongoid
2
- VERSION = '0.6.1'
2
+ VERSION = '0.6.2'
3
3
  end
@@ -11,7 +11,7 @@ module Mongoid
11
11
  include Mongoid::Voteable::Stats
12
12
  field :votes, :type => Mongoid::Voteable::Votes
13
13
 
14
- after_initialize do
14
+ before_create do
15
15
  # Init votes so that counters and point have numeric values (0)
16
16
  self.votes = VOTES_DEFAULT_ATTRIBUTES
17
17
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Alex Nguyen"]
10
10
  s.email = ["alex@vinova.sg"]
11
- s.homepage = "http://vinova.sg/"
11
+ s.homepage = "https://github.com/vinova/voteable_mongoid"
12
12
  s.summary = %q{Add Up / Down Voting for Mongoid}
13
13
  s.description = %q{Add Up / Down Voting for Mongoid (built for speed by using one Mongodb update-in-place for each collection when provided enough information)}
14
14
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voteable_mongoid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.6.1
9
+ - 2
10
+ version: 0.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Nguyen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-31 00:00:00 +08:00
18
+ date: 2011-04-01 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -110,7 +110,7 @@ files:
110
110
  - spec/voteable_mongoid/voter_spec.rb
111
111
  - voteable_mongoid.gemspec
112
112
  has_rdoc: true
113
- homepage: http://vinova.sg/
113
+ homepage: https://github.com/vinova/voteable_mongoid
114
114
  licenses: []
115
115
 
116
116
  post_install_message: