<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
+* Added ActionMailer support
+
+* Added support for rails 2.3
+
 * Removed render_parent for now (in edge rails version)
 
 * inherit_views allows inherited templates to be rendered where there is no action method</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,8 @@ If you're on &lt;b&gt;rails 2.0, or 2.1&lt;/b&gt;, you want {inherit_views/rails-2.0-2.1}[ht
 
 == what does it do?
 
-This rails plugin allows your controllers to inherit their views from parent controllers.  The default behaviour is to inherit along the ancestor path of the controller, but you can also specify custom inherit view paths to search.
+This rails plugin allows your controllers/mailers to inherit their views from parent controllers/mailers.
+The default behaviour is to inherit along the ancestor path of the controller/mailer, but you can also specify custom inherit view paths to search.
 
 Example:
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 require 'inherit_views'
 
-ActionController::Base.send :extend, InheritViews::ClassMethods
-ActionView::Base.send :include, InheritViews::ActionView
\ No newline at end of file
+defined?(ActionController) &amp;&amp; ActionController::Base.extend(InheritViews::ActMethod)
+defined?(ActionMailer) &amp;&amp; ActionMailer::Base.extend(InheritViews::ActMethod)
+defined?(ActionView) &amp;&amp; ActionView::Base.send(:include, InheritViews::ActionView)
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,11 +42,10 @@
 #     # (not 'far' or 'faz' from FooController)
 #   end
 module InheritViews
-  # extension for ActionController::Base which enables inherit_views, this module is extended into
-  # ActionController::Base
-  module ClassMethods
-    # Specify this to have your controller inherit its views from the specified path
-    # or the current controller's default path if no argument is given
+  # class extension which enables specification of inherit_views
+  module ActMethod
+    # Specify this to have your controller or mailer inherit its views from the specified path
+    # or the current controller/mailer's default path if no argument is given
     def inherit_views(*paths)
       class_eval do
         extend PathsContainer unless respond_to?(:inherit_views_paths)
@@ -58,7 +57,7 @@ module InheritViews
 
   # class extension that enables inherit_view_paths to be calculated/set
   #
-  # requires a class method called 'controller_path'
+  # requires a class method called 'controller_path' (ActionController::Base &amp; ActionMailer::Base have this)
   module PathsContainer
     def self.extended(base)
       base.class_eval do
@@ -76,14 +75,13 @@ module InheritViews
       write_inheritable_attribute('inherit_views', bool)
     end
     
-    # Return the inherit view paths, in order of self to ancestor
+    # Return the inherit view paths, in order of self to ancestor.
     # Takes inherit_view_paths from the superclass when first read, and prepends the current controller_path
     def inherit_view_paths
       instance_variable_get('@inherit_view_paths') || instance_variable_set('@inherit_view_paths', [controller_path] + (superclass.inherit_view_paths rescue []))
     end
 
     # Set the inherit view paths, in order of self to ancestor.
-    #
     # The controller_path for self is always prepended to the front, no matter what the arguments.
     def inherit_view_paths=(new_paths)
       new_paths -= [controller_path]
@@ -92,19 +90,6 @@ module InheritViews
     end
   end
   
-  # Mixin for ActionView::Base to enable inherit views functionality
-  module ActionView
-    def self.included(base)
-      base.class_eval do
-        def view_paths=(value)
-          @view_paths = InheritViews::PathSet.new(value)
-        ensure
-          @view_paths.inherit_view_paths = controller.inherit_view_paths if (controller.inherit_views? rescue false)
-        end
-      end
-    end
-  end
-  
   # just like a normal path set, but can have an optional array of inherit_view_paths
   # which will be used to look for a matching template if the original template is missing
   class PathSet &lt; ::ActionView::PathSet
@@ -137,4 +122,17 @@ module InheritViews
     end
     memoize :find_template_from_inherit_view_paths
   end
+  
+  # Mixin for ActionView::Base to enable inherit views functionality
+  module ActionView
+    def self.included(base)
+      base.class_eval do
+        def view_paths=(value)
+          @view_paths = InheritViews::PathSet.new(value)
+        ensure
+          @view_paths.inherit_view_paths = controller.inherit_view_paths if (controller.inherit_views? rescue false)
+        end
+      end
+    end
+  end
 end
\ No newline at end of file</diff>
      <filename>lib/inherit_views.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,5 +43,5 @@ end
 
 # inherits views form normal mailer
 class InheritingMailer &lt; NormalMailer
-  #inherit_views 'normal_mailer'
+  inherit_views 'normal_mailer'
 end
\ No newline at end of file</diff>
      <filename>spec/app.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,10 @@ describe 'Mailer specs' do
     ActionMailer::Base.perform_deliveries = true
   end
   
+  before :each do
+    ActionMailer::Base.deliveries.clear
+  end
+  
   describe NormalMailer do
     before :each do
       NormalMailer.deliver_email</diff>
      <filename>spec/mailers/mailer_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>623a79af5e81af5a1c9be2eb9d2a9e4026bba722</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/inherit_views/commit/a8f3979e508e0c50224b5e146055a2af5aa12f18</url>
  <id>a8f3979e508e0c50224b5e146055a2af5aa12f18</id>
  <committed-date>2009-02-07T11:10:05-08:00</committed-date>
  <authored-date>2009-02-07T11:10:05-08:00</authored-date>
  <message>Added ActionMailer support for inherit_views</message>
  <tree>c16bd2b80ebf2f80aef5ee272664c37e14338afd</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
