<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/rails22_hooks.rb</filename>
    </added>
    <added>
      <filename>lib/rails23_hooks.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -11,71 +11,8 @@ end
 
 if ActionController::Base.private_instance_methods.include?('template_exists?')
   #Rails 2.2 and earlier:
-  
-  ActionView::Base.class_eval do
-    include ResourcefulViews::ActionViewExtensions
-  end
-
+  require 'rails22_hooks'
 else
   #Rails 2.3 and later:
-  
-  ActionView::PathSet.class_eval do
-    def find_template_with_extra_default_paths(original_template_path, format = nil)
-      find_template_without_extra_default_paths(original_template_path, format)
-    rescue ActionView::MissingTemplate =&gt; e        
-      parts = original_template_path.split(&quot;/&quot;)
-    
-      theme = nil
-      if self.respond_to?(:controller)
-        if controller.respond_to?(:resourceful_views_theme)
-          theme = controller.resourceful_views_theme(controller.action_name)
-        end
-      end
-      if theme
-        parts[0] = &quot;themes/#{theme}&quot;
-        begin
-          return find_template_without_extra_default_paths(parts.join(&quot;/&quot;), format)
-        rescue ActionView::MissingTemplate =&gt; e
-          #fall through to next
-        end
-      end
-    
-      parts = original_template_path.split(&quot;/&quot;)
-      parts[0] = &quot;default&quot;
-    
-      find_template_without_extra_default_paths(parts.join(&quot;/&quot;), format)
-    end
-  
-    alias_method_chain :find_template, :extra_default_paths
-  end
-
-  ActionController::Base.class_eval do
-    def template_exists?(template_path)
-      format = @template.template_format
-      tempalte = @template.view_paths.find_template(template_path, format)
-      true
-    rescue ActionView::MissingTemplate =&gt; e
-      false
-    end
-  end
-
-  ActionView::Base.class_eval do
-
-    def view_paths_with_controller_knowledge
-      to_return = view_paths_without_controller_knowledge
-      unless to_return.respond_to?(:controller)
-        to_return.instance_eval do
-          class &lt;&lt; self
-            attr_accessor :controller
-          end
-        end
-        to_return.controller = self.controller
-      end
-      to_return
-    end
-  
-    alias_method_chain :view_paths, :controller_knowledge
-  
-  end
-
+  require 'rails23_hooks'
 end</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,46 +65,7 @@ module ResourcefulViews
       template_exists?(path)
     end
   end
-  
-  module ActionViewExtensions
-    def self.included(base)
-      base.class_eval do
-        alias_method_chain :_pick_template, :extra_default_paths
-      end
-    end
     
-    def _pick_template_with_extra_default_paths(template_path)
-      begin
-        _pick_template_without_extra_default_paths(template_path)
-      rescue ActionView::MissingTemplate =&gt; e
-
-        template_exists_checker = Proc.new do |template_name|
-          begin
-            _pick_template_without_extra_default_paths(template_name) ? true : false
-          rescue ActionView::MissingTemplate
-            false
-          end
-        end
-
-        theme = nil
-        if self.respond_to?(:controller)
-          if controller.respond_to?(:resourceful_views_theme)
-            theme = controller.resourceful_views_theme(controller.action_name)
-          end
-        end
-
-        template_path = ResourcefulViews.determine_view_path_from_parts(template_path.split(&quot;/&quot;), theme) do |path_base, path_last|
-          template_exists_checker.call(&quot;#{path_base}/#{path_last}&quot;)
-        end
-        if template_path
-          _pick_template_without_extra_default_paths(template_path)
-        else
-          raise e
-        end
-      end
-    end    
-  end
-  
   # Helper method for the various content_for-like methods provided by ResourcefulViewsHelper
   # 
   # Expected to be called with a block that can be used to determine if a template / erb file exists for a yielded base_path and file_name</diff>
      <filename>lib/resourceful_views.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>119de18de5f63f76a4ce1406131e1233985f5de0</id>
    </parent>
  </parents>
  <author>
    <name>Jacob Burkhart</name>
    <email>igotimac@gmail.com</email>
  </author>
  <url>http://github.com/brontes3d/resourceful_views/commit/36be77d7983ac66355b4d02a6ed865cb044569bd</url>
  <id>36be77d7983ac66355b4d02a6ed865cb044569bd</id>
  <committed-date>2009-02-06T14:54:14-08:00</committed-date>
  <authored-date>2009-02-06T14:54:14-08:00</authored-date>
  <message>break up rail 2.2 hooks and rails 2.3 hooks into seperate files for readability</message>
  <tree>ad653499afc0a7a92993d06ae04148e98cc1e53e</tree>
  <committer>
    <name>Jacob Burkhart</name>
    <email>igotimac@gmail.com</email>
  </committer>
</commit>
