mongoid-forums 0.0.9 → 0.0.10
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: 48f9fb44106dc7ee9893700c82ab559aaba41743
|
4
|
+
data.tar.gz: 586a546b29ec037aebfa8f3e155fcdf5562a94e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 576b1c9963613a475f9d982e784578c297abf08ca9b7411e1fc90f5a18cf086319a43581e039761f05aaead4e1a80518776aa299a93ca977c85e2736366f09c6
|
7
|
+
data.tar.gz: aab0c333471cac834a7e5575d33e4eca12e289912db59d74d2e745d6944cbac765be04228c9886d4773b34f0bd379c3442dafa5246b45dea56aac1a2bd12486d
|
@@ -12,7 +12,7 @@ module MongoidForums
|
|
12
12
|
@posts = @posts.page(params[:page]).per(MongoidForums.per_page)
|
13
13
|
|
14
14
|
if mongoid_forums_user.present?
|
15
|
-
Alert.where(:
|
15
|
+
Alert.where(user_id: mongoid_forums_user.id, read: false, subscription_id: Subscription.where(subscribable_id: @topic.id, subscriber_id: mongoid_forums_user.id).first).update_all(:read => true, :ready_at => Time.now)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -64,16 +64,16 @@ module MongoidForums
|
|
64
64
|
def text
|
65
65
|
str = ""
|
66
66
|
case self.subscription.subscribable_type
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
when "MongoidForums::Topic"
|
68
|
+
str += self.mongoid_forums_topic_replier
|
69
|
+
if self.mongoid_forums_topic_count > 0
|
70
|
+
str += " and " + self.mongoid_forums_topic_count.to_s + " other" + (self.mongoid_forums_topic_count > 1 ? "s" : "")
|
71
|
+
end
|
72
|
+
str += " replied to " + self.subscription.subscribable.name
|
73
|
+
else
|
74
|
+
str
|
71
75
|
end
|
72
|
-
|
73
|
-
else
|
74
|
-
str
|
75
|
-
end
|
76
|
-
str += " " + time_ago_in_words(self.updated_at, false, :vague => true) + " ago"
|
76
|
+
return str
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-forums
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- skipperguy12
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|