mailboxer 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/mailers/message_mailer.rb +6 -2
- data/app/mailers/notification_mailer.rb +3 -1
- data/app/models/conversation.rb +2 -2
- data/mailboxer.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6f8c3c1cb117883b23f63dcd0b539cbc96f0e63
|
4
|
+
data.tar.gz: 4ca5f945d183d2eed59d4404e8bcf4d9a8873a4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c3c296350557ad682836ebbabde11dd81956efa0895b62f29523a9d7017cce65ea17c312cc0e639483253ae3d44cc43173e6ee94f0083e969df1d94c00bdf6
|
7
|
+
data.tar.gz: 0288431615ef22cd4541c945e007676f9dda03dbe843055f63d7267c36baa2ec98f2481b1d80f58e2e160cc4442b0e931009710d72835895f592b6c88b1b77b2
|
@@ -19,7 +19,9 @@ class MessageMailer < ActionMailer::Base
|
|
19
19
|
@receiver = receiver
|
20
20
|
subject = message.subject.to_s
|
21
21
|
subject = strip_tags(subject) unless subject.html_safe?
|
22
|
-
mail
|
22
|
+
mail :to => receiver.send(Mailboxer.email_method,message),
|
23
|
+
:subject => t('mailboxer.message_mailer.subject_new', :subject => subject),
|
24
|
+
:template_name => 'new_message_email'
|
23
25
|
end
|
24
26
|
|
25
27
|
#Sends and email for indicating a reply in an already created conversation
|
@@ -28,6 +30,8 @@ class MessageMailer < ActionMailer::Base
|
|
28
30
|
@receiver = receiver
|
29
31
|
subject = message.subject.to_s
|
30
32
|
subject = strip_tags(subject) unless subject.html_safe?
|
31
|
-
mail
|
33
|
+
mail :to => receiver.send(Mailboxer.email_method,message),
|
34
|
+
:subject => t('mailboxer.message_mailer.subject_reply', :subject => subject),
|
35
|
+
:template_name => 'reply_message_email'
|
32
36
|
end
|
33
37
|
end
|
@@ -14,6 +14,8 @@ class NotificationMailer < ActionMailer::Base
|
|
14
14
|
@receiver = receiver
|
15
15
|
subject = notification.subject.to_s
|
16
16
|
subject = strip_tags(subject) unless subject.html_safe?
|
17
|
-
mail
|
17
|
+
mail :to => receiver.send(Mailboxer.email_method,notification),
|
18
|
+
:subject => t('mailboxer.notification_mailer.subject', :subject => subject),
|
19
|
+
:template_name => 'new_notification_email'
|
18
20
|
end
|
19
21
|
end
|
data/app/models/conversation.rb
CHANGED
@@ -71,8 +71,8 @@ class Conversation < ActiveRecord::Base
|
|
71
71
|
|
72
72
|
#Originator of the conversation.
|
73
73
|
def originator
|
74
|
-
@
|
75
|
-
return @
|
74
|
+
@originator = self.original_message.sender if @originator.nil?
|
75
|
+
return @originator
|
76
76
|
end
|
77
77
|
|
78
78
|
#First message of the conversation.
|
data/mailboxer.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "mailboxer"
|
3
|
-
s.version = "0.10.
|
3
|
+
s.version = "0.10.2"
|
4
4
|
s.authors = ["Eduardo Casanova Cuesta"]
|
5
5
|
s.summary = "Messaging system for rails apps."
|
6
6
|
s.description = "A Rails engine that allows any model to act as messageable, adding the ability to exchange messages " +
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailboxer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Casanova Cuesta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreigner
|