acts_as_commentable_more 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6df043ba166bd6129581d78d8496c2cfad6f9996
|
4
|
+
data.tar.gz: 5b0b4733b0ee6e62b275ca293bf6f5ca649320a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02e3d613250fbce7d82a5d99379a856bf14d96198ae5822e8d4f5ddd4695adb432c04714dd52626a2b9924b07d76a9f0708611e83472a62079b40d15bda47498
|
7
|
+
data.tar.gz: 2383cccaa8de0f02b745d1a0e53199d5af0afe180304bc311c6388d7997e91c980c4032fb2afb7727131f0a0f18d4a1a160b1ca22dc17ad32a69b4c480186834
|
@@ -47,7 +47,12 @@ module ActsAsCommentableMore
|
|
47
47
|
|
48
48
|
# setting attributes for read only
|
49
49
|
post_model = self
|
50
|
-
counter_fields =
|
50
|
+
counter_fields = ["#{association_comment_name.to_s}_count"]
|
51
|
+
if post_model.comment_roles.size > 1
|
52
|
+
post_model.comment_roles.each do |role|
|
53
|
+
counter_fields << "#{role.to_s}_#{association_comment_name.to_s}_count"
|
54
|
+
end
|
55
|
+
end
|
51
56
|
post_model.attr_readonly(*counter_fields)
|
52
57
|
end
|
53
58
|
|