flexible_feeds 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/flexible_feeds/acts_as_voter.rb +14 -0
- data/lib/flexible_feeds/version.rb +1 -1
- data/lib/flexible_feeds.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjgzNmE4YzZmMzgzOWE0NDY4OWQ0OWRlYTE1NGI0Y2U1ODI2ZWUwZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWNlYzEwYTRhMzFhNmNlMTkwMWU2ZDgyY2FhNWMwYjhmNjcxNjcyOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmU1NTNlZmY5OGM4NTk0ZmUzZjM0NGQ1ZjNiNTg1ZWE2MTExNzI0ZmJhYTU0
|
10
|
+
MjEwNjA3YWJkOGNiODJjZGNmMGM5NzM2ZmQ1OGFhNGJhZGIzM2Y5MDAxYjg1
|
11
|
+
MWFiMGQ5OTRiMjZkN2U0MmNmZjdjYWI3ZjkxM2Q4NDA0YmRkMGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzYwYjYwYjJiYzk1YmFmY2U5ZGFjYzVkMmUwZGU3MjIyYTlhMDMyYTBkMjU3
|
14
|
+
ZWU4Y2ZmM2ExODU0NWQyNjBlYmQ0OTc3MzFlZjk5NDYzMmFlZjY5MDUxNTRh
|
15
|
+
N2VkN2Q1Njc1OWQ3OTE1NjQzZDhhZjUyMjZiZDhmOGUzMzJmZTc=
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module FlexibleFeeds
|
2
|
+
module ActsAsVoter
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
module ClassMethods
|
6
|
+
def acts_as_voter(options = {})
|
7
|
+
|
8
|
+
has_many :votes, as: :voter, class_name: "FlexibleFeeds::Vote"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
ActiveRecord::Base.send :include, FlexibleFeeds::ActsAsVoter
|
data/lib/flexible_feeds.rb
CHANGED
@@ -3,6 +3,7 @@ require "flexible_feeds/flexible_feeds"
|
|
3
3
|
require "flexible_feeds/acts_as_eventable"
|
4
4
|
require "flexible_feeds/acts_as_moderator"
|
5
5
|
require "flexible_feeds/acts_as_follower"
|
6
|
+
require "flexible_feeds/acts_as_voter"
|
6
7
|
require "flexible_feeds/acts_as_parent"
|
7
8
|
require "flexible_feeds/acts_as_child"
|
8
9
|
require "flexible_feeds/polymorphic_join"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexible_feeds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- timothycommoner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/flexible_feeds/acts_as_follower.rb
|
173
173
|
- lib/flexible_feeds/acts_as_moderator.rb
|
174
174
|
- lib/flexible_feeds/acts_as_parent.rb
|
175
|
+
- lib/flexible_feeds/acts_as_voter.rb
|
175
176
|
- lib/flexible_feeds/engine.rb
|
176
177
|
- lib/flexible_feeds/flexible_feeds.rb
|
177
178
|
- lib/flexible_feeds/polymorphic_join.rb
|