<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,6 +4,9 @@ require 'patches/actioncontroller_ex'
 require 'patches/actionmailer_ex'
 require 'patches/routeset_ex'
 
+ActionController::Base.send(:include, ThemeSupport::ControllerExtensions)
+ActionMailer::Base.send(:include, ThemeSupport::ControllerExtensions)
+
 # Add the tag helpers for rhtml and, optionally, liquid templates
 require 'helpers/rhtml_theme_tags'
 </diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,12 @@ module ThemeSupport
       attr_accessor :force_liquid_template
       
       # Retrieves the current set theme
-      def current_theme(passed_theme=nil)
+      
+      def current_theme(passed_theme = nil)
+        @current_theme ||= get_current_theme(passed_theme)
+      end
+      
+      def get_current_theme(passed_theme=nil)
         theme = passed_theme || self.class.read_inheritable_attribute(&quot;theme&quot;)
 
         @active_theme = case theme
@@ -58,6 +63,3 @@ module ThemeSupport
     end
   end
 end
-
-ActionMailer::Base.send(:include, ThemeSupport::ControllerExtensions)
-ActionController::Base.send(:include, ThemeSupport::ControllerExtensions)
\ No newline at end of file</diff>
      <filename>lib/patches/actioncontroller_ex.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,6 @@
-# Extend the Base ActionController to support themes
+# Extend the Base ActionMailer to support themes
 module ActionMailer
   class Base
-  
-    alias_method :__render, :render
-    alias_method :__initialize, :initialize
    
     def initialize(method_name=nil, *parameters)
       if parameters[-1].is_a?(Hash) and (parameters[-1].include? :theme)
@@ -90,8 +87,5 @@ module ActionMailer
       # build the mail object itself
       @mail = create_mail
     end
-
-    
-   
   end
 end
\ No newline at end of file</diff>
      <filename>lib/patches/actionmailer_ex.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fb8088ec9a700a1f3c94b3e9bd83117162781ec0</id>
    </parent>
  </parents>
  <author>
    <name>James Stewart</name>
    <email>james@saigon.local</email>
  </author>
  <url>http://github.com/jystewart/theme_support/commit/16b57d5849be3e882c1f546aa66ae60ebbbe2993</url>
  <id>16b57d5849be3e882c1f546aa66ae60ebbbe2993</id>
  <committed-date>2009-04-25T05:18:58-07:00</committed-date>
  <authored-date>2009-04-25T05:18:58-07:00</authored-date>
  <message>Break out the current_theme method into two parts to fix some of the ActionMailer integration</message>
  <tree>07350c9fc5b2ba0dd0941ec46a5dd1c7c8d15bdd</tree>
  <committer>
    <name>James Stewart</name>
    <email>james@saigon.local</email>
  </committer>
</commit>
