popularity_contest 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/popularity_contest/view_helpers.rb +3 -1
- data/popularity_contest.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f005c580d17c6df88fdcf665524a449ba45a5ab
|
4
|
+
data.tar.gz: 98ed7c8695f1635e28a9a4ab31c5dac6bbe3dd98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a9862a07106d8b356a645799cbda95a99a21512679310015c3414067478270c891183149a484e7ad85a458248a8a2ae5c1e37d932cf73970769a4520c938df7
|
7
|
+
data.tar.gz: 85f503c1675502a92408c9f9cf74017dfef33a4c6bf7ec011500da1037bed34d45d3208cfc8655374dcdfac823c9783df68060cb219d9cb53d766c6df8f0773b
|
@@ -13,7 +13,7 @@ module PopularityContest
|
|
13
13
|
url = build_path(content_type, content_id)
|
14
14
|
<<-SJS
|
15
15
|
<script>
|
16
|
-
if (jQuery) {
|
16
|
+
if (typeof jQuery !== 'undefined') {
|
17
17
|
(function(window, document, $, undefined) {
|
18
18
|
$.ajax({
|
19
19
|
url: '#{url}',
|
@@ -21,6 +21,8 @@ if (jQuery) {
|
|
21
21
|
cache: false
|
22
22
|
})
|
23
23
|
}(window, document, jQuery));
|
24
|
+
} else {
|
25
|
+
console.warn("jQuery is not defined, the `popularity_contest` will not work");
|
24
26
|
}
|
25
27
|
</script>
|
26
28
|
SJS
|
data/popularity_contest.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "popularity_contest"
|
7
|
-
spec.version = "0.0
|
7
|
+
spec.version = "0.1.0"
|
8
8
|
spec.authors = ["Kasper Grubbe"]
|
9
9
|
spec.email = ["kawsper@gmail.com"]
|
10
10
|
spec.description = "A Rack application to count and sort popular content on our websites"
|