thumbs_up 0.3.0 → 0.3.1
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/lib/acts_as_voteable.rb +1 -1
- data/lib/acts_as_voter.rb +2 -0
- data/thumbs_up.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.1
|
data/lib/acts_as_voteable.rb
CHANGED
|
@@ -7,7 +7,7 @@ module ThumbsUp
|
|
|
7
7
|
|
|
8
8
|
module ClassMethods
|
|
9
9
|
def acts_as_voteable
|
|
10
|
-
has_many :votes, :as => :voteable, :dependent => :
|
|
10
|
+
has_many :votes, :as => :voteable, :dependent => :destroy
|
|
11
11
|
|
|
12
12
|
include ThumbsUp::ActsAsVoteable::InstanceMethods
|
|
13
13
|
extend ThumbsUp::ActsAsVoteable::SingletonMethods
|
data/lib/acts_as_voter.rb
CHANGED
|
@@ -9,6 +9,8 @@ module ThumbsUp #:nodoc:
|
|
|
9
9
|
def acts_as_voter
|
|
10
10
|
|
|
11
11
|
# If a voting entity is deleted, keep the votes.
|
|
12
|
+
# If you want to nullify (and keep the votes), you'll need to remove
|
|
13
|
+
# the unique constraint on the [ voter, voteable ] index in the database.
|
|
12
14
|
# has_many :votes, :as => :voter, :dependent => :nullify
|
|
13
15
|
# Destroy votes when a user is deleted.
|
|
14
16
|
has_many :votes, :as => :voter, :dependent => :destroy
|
data/thumbs_up.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{thumbs_up}
|
|
8
|
-
s.version = "0.3.
|
|
8
|
+
s.version = "0.3.1"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Brady Bouchard", "Peter Jackson", "Cosmin Radoi", "Bence Nagy", "Rob Maddox", "Wojciech Wnętrzak"]
|
|
12
|
-
s.date = %q{2010-
|
|
12
|
+
s.date = %q{2010-09-06}
|
|
13
13
|
s.description = %q{ThumbsUp provides dead-simple voting capabilities to ActiveRecord models with karma calculation, a la stackoverflow.com.}
|
|
14
14
|
s.email = %q{brady@ldawn.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 3
|
|
8
|
-
-
|
|
9
|
-
version: 0.3.
|
|
8
|
+
- 1
|
|
9
|
+
version: 0.3.1
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Brady Bouchard
|
|
@@ -19,7 +19,7 @@ autorequire:
|
|
|
19
19
|
bindir: bin
|
|
20
20
|
cert_chain: []
|
|
21
21
|
|
|
22
|
-
date: 2010-
|
|
22
|
+
date: 2010-09-06 00:00:00 +10:00
|
|
23
23
|
default_executable:
|
|
24
24
|
dependencies: []
|
|
25
25
|
|