Skip to content

Commit

Permalink
Backported ActionMailer support from master(rails 2.3) branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Feb 9, 2009
1 parent e385fe6 commit b202856
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions History.txt
@@ -1,3 +1,5 @@
* Backported ActionMailer support from master branch

* render_parent is replaced with render :parent (works for normal templates and partials)

* Removed render_parent for now (in edge rails version)
Expand Down
3 changes: 3 additions & 0 deletions init.rb
@@ -1,4 +1,7 @@
require 'ardes/inherit_views'

if defined?(ActionMailer)
ActionMailer::Base.send :extend, Ardes::InheritViews::ActionController
end
ActionController::Base.send :extend, Ardes::InheritViews::ActionController
ActionView::Base.send :include, Ardes::InheritViews::ActionView
2 changes: 1 addition & 1 deletion spec/app.rb
Expand Up @@ -43,5 +43,5 @@ def email

# inherits views form normal mailer
class InheritingMailer < NormalMailer
#inherit_views 'normal_mailer'
inherit_views 'normal_mailer'
end
4 changes: 4 additions & 0 deletions spec/mailers/mailer_spec.rb
Expand Up @@ -6,6 +6,10 @@
ActionMailer::Base.perform_deliveries = true
end

before :each do
ActionMailer::Base.deliveries.clear
end

describe NormalMailer do
before :each do
NormalMailer.deliver_email
Expand Down

0 comments on commit b202856

Please sign in to comment.