mailboxer 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ class Message < Notification
29
29
  msg_receipt.mailbox_type = "inbox"
30
30
  temp_receipts << msg_receipt
31
31
  #Should send an email?
32
- if r.should_email? self
32
+ if Mailboxer.uses_emails and r.should_email? self
33
33
  MessageMailer.send_email(self,r).deliver
34
34
  end
35
35
  end
@@ -33,7 +33,7 @@ class Notification < ActiveRecord::Base
33
33
  msg_receipt.receiver = r
34
34
  temp_receipts << msg_receipt
35
35
  #Should send an email?
36
- if r.should_email? self
36
+ if Mailboxer.uses_emails and r.should_email? self
37
37
  NotificationMailer.send_email(self,r).deliver
38
38
  end
39
39
  end
@@ -1,4 +1,8 @@
1
1
  Mailboxer.setup do |config|
2
+
3
+ #Configures if you applications uses or no the email sending for Notifications and Messages
4
+ config.uses_emails = true
5
+
2
6
  #Configures the default from for the email sent for Messages and Notifications of Mailboxer
3
7
  config.default_from = "no-reply@mailboxer.com"
4
8
  end
data/lib/mailboxer.rb CHANGED
@@ -7,6 +7,7 @@ module Mailboxer
7
7
  end
8
8
 
9
9
  mattr_accessor :default_from
10
+ mattr_accessor :uses_emails
10
11
 
11
12
  class << self
12
13
  def setup
data/mailboxer.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mailboxer"
3
- s.version = "0.1.1"
3
+ s.version = "0.1.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, permitting it interchange messages with any other messageable model." +
@@ -1,3 +1,8 @@
1
1
  Mailboxer.setup do |config|
2
+
3
+ #Configures if you applications uses or no the email sending for Notifications and Messages
4
+ config.uses_emails = true
5
+
6
+ #Configures the default from for the email sent for Messages and Notifications of Mailboxer
2
7
  config.default_from = "no-reply@mailboxer.com"
3
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailboxer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eduardo Casanova Cuesta
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-28 00:00:00 +02:00
18
+ date: 2011-04-29 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -210,7 +210,7 @@ files:
210
210
  - spec/dummy/db/migrate/20110228120600_create_users.rb
211
211
  - spec/dummy/db/migrate/20110306002940_create_ducks.rb
212
212
  - spec/dummy/db/migrate/20110306015107_create_cylons.rb
213
- - spec/dummy/db/migrate/20110427123542_create_mailboxer.rb
213
+ - spec/dummy/db/migrate/20110429101611_create_mailboxer.rb
214
214
  - spec/dummy/public/404.html
215
215
  - spec/dummy/public/422.html
216
216
  - spec/dummy/public/500.html