my_forum 0.0.1.beta55 → 0.0.1.beta56

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: d60d076b33e39482575fa28df6a0cb00abd6fd0a
4
- data.tar.gz: 1cc2d2d4d6de0fd303d9efb42460fb9747e0dc17
3
+ metadata.gz: 6b99919419adc515dae69ac72fed68472de713b5
4
+ data.tar.gz: fe552695d52f7bfd995b1c683dfa7a2721e9c338
5
5
  SHA512:
6
- metadata.gz: 1e1b855277fa1dec912d8e7c394579e55b65c285c1216edafe732762393a8121a7cbda0cce01ce8aae703cc345fff7dd6fb340a3a144971e26eca9497d6e05cc
7
- data.tar.gz: 3a6f0d50d345965110223814ad1d4617b28048af488a241021f5dde12942b11f944e977a9ae10358aa6e0197f81090f074a4c37e1300867a562aed51fdad75d0
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
- !LogReadMark.where(user_id: current_user.id, topic_id: self.id, post_id: last_post.id).present?
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)
@@ -1,3 +1,3 @@
1
1
  module MyForum
2
- VERSION = "0.0.1.beta55"
2
+ VERSION = "0.0.1.beta56"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_forum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta55
4
+ version: 0.0.1.beta56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Omelchenko