my_forum 0.0.1.beta55 → 0.0.1.beta56
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/app/models/my_forum/topic.rb +4 -1
- data/lib/my_forum/version.rb +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: 6b99919419adc515dae69ac72fed68472de713b5
|
|
4
|
+
data.tar.gz: fe552695d52f7bfd995b1c683dfa7a2721e9c338
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 793c9a79c2b11bb7790ca38b50e0b4f5de3baf9e91612e0e9dbdd377f8ff96361eaabb9b3c3a35753fb1fc89c7b11395e606ac314181db448a960f6d35791101
|
|
7
|
+
data.tar.gz: e04820058000d9cc9e6b65049c7a97c04a8f049a6da625c2895a4f2c0f2d916e90d522473c68f77185a97a28dfa97825a530353e03e906c2da84a8e375d0dbb1
|
|
@@ -21,7 +21,10 @@ module MyForum
|
|
|
21
21
|
return false unless current_user
|
|
22
22
|
return false if current_user.created_at > last_post.created_at
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
logged_post = LogReadMark.where(user_id: current_user.id, topic_id: self.id).first
|
|
25
|
+
return true unless logged_post
|
|
26
|
+
|
|
27
|
+
last_post.id > logged_post.post_id
|
|
25
28
|
end
|
|
26
29
|
|
|
27
30
|
def mark_as_read(current_user, last_post)
|
data/lib/my_forum/version.rb
CHANGED