commontator 6.1.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/commontator/thread.rb +11 -1
- data/lib/commontator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b43492888aa32e2a5281147f5b8fa373bf4368fdac7e251f56652aee7263c6e
|
4
|
+
data.tar.gz: df8792352f99e43ae5bb707c73b8f7e2761d4172659816895603d1dc8d3a053d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d8149b165e5a4a1b3dfe9b9035129fd1fa232c9c65b0b5852bb5944ea3e2e9188142124e376821ca624b268e19ba32a5a762de1416b72a4690d23325c9cf897
|
7
|
+
data.tar.gz: 2c47c72b76baf4687caae23c5e6d5348e5ee4f1d987ef2ce6b07f22225e39d15be3a3cd2a450442c19bad1aa0712c7ed534e44cdb1f637d73f25518dbfdd45e5
|
@@ -60,7 +60,17 @@ class Commontator::Thread < ActiveRecord::Base
|
|
60
60
|
|
61
61
|
def comments_with_parent_id(parent_id, show_all)
|
62
62
|
oc = ordered_comments(show_all)
|
63
|
-
|
63
|
+
|
64
|
+
if [ :i, :b ].include?(config.comment_reply_style)
|
65
|
+
# Filter comments by parent_id so we display nested comments
|
66
|
+
oc.where(parent_id: parent_id)
|
67
|
+
elsif parent_id.nil?
|
68
|
+
# Parent is the thread itself and nesting is disabled, so include all comments
|
69
|
+
oc
|
70
|
+
else
|
71
|
+
# Parent is some comment and nesting is disabled, so return nothing
|
72
|
+
oc.none
|
73
|
+
end
|
64
74
|
end
|
65
75
|
|
66
76
|
def paginated_comments(page, parent_id, show_all)
|
data/lib/commontator/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
COMMONTATOR_VERSION = '6.1.
|
1
|
+
COMMONTATOR_VERSION = '6.1.1'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commontator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dante Soares
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|