cached_mailer 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cached_mailer}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mhodgson"]
@@ -3,6 +3,7 @@ class <%= migration_name %> < ActiveRecord::Migration
3
3
  create_table :<%= table_name %> do |t|
4
4
  t.column :from, :string
5
5
  t.column :to, :string
6
+ t.column :mailer, :string
6
7
  t.column :template, :string
7
8
  t.column :mail, :text
8
9
  t.column :created_on, :datetime
@@ -15,12 +15,12 @@ class ActionMailer::Base
15
15
 
16
16
  def deliver_with_cache!(mail = @mail)
17
17
  mail.destinations.each do |destination|
18
- mail_attributes = {:to => destination, :from => mail.from.first, :template => @template}
18
+ mail_attributes = {:to => destination, :from => mail.from.first, :template => @template, :mailer => self.class.to_s}
19
19
  mail_attributes.merge!(:mail => mail.encoded) if cache_content
20
20
  self.class.email_class.create mail_attributes
21
21
  end
22
22
  deliver_without_cache!
23
23
  end
24
24
  alias_method_chain :deliver!, :cache
25
-
25
+
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cached_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - mhodgson