is_rateable 0.3.1 → 0.3.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.
- checksums.yaml +4 -4
- data/lib/is_rateable/acts_as_rateable.rb +3 -0
- data/lib/is_rateable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a328f75b5a77bdf01743d355f322733bc61d44d1
|
4
|
+
data.tar.gz: 923b6560a5fe0e4ddafe6e597b329d40e0ca8956
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874c7b4f311bd4ea016d1ba09a71dbaf3464e2de50a51a9742c2a830b00ce8f84b549ea27ae33492f0f6d0a76bdf7bf54bcae4d90f948d6e4ea8dd65bdc93867
|
7
|
+
data.tar.gz: cfe2b7fc4dc7bcab59d1f8850f11179e67cbfeaf6f728b1f6fe02a1d5215457e42de3f546fdbb182ca97ad9eb7d121207cb255e92135dd437d3bcb40a3e57f91
|
@@ -11,6 +11,9 @@ module IsRateable
|
|
11
11
|
|
12
12
|
has_many :ratee_ratings, as: :ratee, class_name: 'IsRateable::Rating'
|
13
13
|
|
14
|
+
def above_average_rating(rating)
|
15
|
+
joins(:ratee_ratings).merge(Rating.group(:ratee_id, :ratee_type).having('AVG(score) > ?', rating))
|
16
|
+
end
|
14
17
|
end
|
15
18
|
end
|
16
19
|
|
data/lib/is_rateable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: is_rateable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Norman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
164
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.4.
|
165
|
+
rubygems_version: 2.4.7
|
166
166
|
signing_key:
|
167
167
|
specification_version: 4
|
168
168
|
summary: 5 star ratings for your Rails models
|