<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>README</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,9 @@
+* Removed render_parent for now (in edge rails version)
+
+* inherit_views allows inherited templates to be rendered where there is no action method
+
+* Vastly simplified internals, making use of the _pick_template single point of entry
+
 * branched fro rails 2.0 and 2.1 in rails-2.0-2.1, edge rails follows master branch
 
 * Now using garlic for CI</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -27,9 +27,6 @@ Example:
   class BarController &lt; FooController
     # will look for views in 'views/bar', then 'views/foo', then 'view/application'
   end
-
-You can also render the parent view in your views with
-  &lt;%= render_parent %&gt;
   
 See Ardes::InheritViews for more details
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -9,8 +9,6 @@ AController &lt; TestController; inherit_views (an instance)
 - GET :in_abc should render a/in_abc
 - GET :in_a should render a/in_a
 - GET :in_ab should render a/in_ab
-- GET :render_parent should render a/render_parent
-- GET :inherited_template_path should render its contents
 
 BController &lt; TestController; inherit_views 'a' (the class)
 - should be inherit views
@@ -23,10 +21,9 @@ BController &lt; TestController; inherit_views 'a' (an instance)
 - GET :in_ab should render b/in_ab
 - GET :in_b should render b/in_b
 - GET :in_abc should render b/in_abc
-- GET :render_parent should render a/render_parent inside b/render_parent
-- GET :bad_render_parent should raise ActionView::TemplateError as there is no parent to render
 - GET :partial_in_bc should render b/partial_in_bc &amp; b/_partial_in_bc
 - GET :partial_in_b should render b/partial_in_b &amp; b/_partial_in_b
+- GET :collection_in_bc should render b/collection_in_bc then b/_partial_in_bc
 
 CController &lt; BController (the class)
 - should be inherit views
@@ -40,9 +37,9 @@ CController &lt; BController (an instance)
 - GET :in_b should render b/in_b
 - GET :in_abc should render c/in_abc
 - GET :in_c should render c/in_c
-- GET :render_parent should render a/render_parent inside b/render_parent inside c/render_parent
 - GET :partial_in_bc should render b/partial_in_bc then c/_partial_in_bc
 - GET :partial_in_b should render b/partial_in_b &amp; b/_partial_in_b
+- GET :collection_in_bc should render b/collection_in_bc then c/_partial_in_bc
 
 DController &lt; AController; inherit_views 'other' (the class)
 - should be inherit views
@@ -55,17 +52,6 @@ DController &lt; AController; inherit_views 'other' (an instance)
 NormalController
 - GET :partial_from_c should render normal/partial_from_c, then c/_partial_in_bc
 
-InheritViews controllers in production mode
-- should have inherited_template_paths_cache
-- should cache calls to find_inherited_template_path
-- should maintain different caches in different classes
+Finished in 0.348816 seconds
 
-NoTemplateFinderController
-- .file_exists_in_template? should call template.file_exists?
-
-WithTemplateFinderController
-- .file_exists_in_template? should call template.finder.file_exists?
-
-Finished in 0.296507 seconds
-
-43 examples, 0 failures
+35 examples, 0 failures</diff>
      <filename>SPECDOC</filename>
    </modified>
    <modified>
      <diff>@@ -12,17 +12,6 @@ module Ardes#:nodoc:
   #     ... # will look for views in 'views/bar' and 'views/foo' 
   #   end
   #
-  # in views/foo/_my_view.rhtml:
-  #
-  #   &lt;h1&gt;My View Thing&lt;/h1&gt;
-  #
-  # in views/bar/_my_view.rhtml:
-  #
-  #   &lt;%= render_parent %&gt;
-  #   &lt;p&gt;With some bar action&lt;/p&gt;
-  # 
-  # === In Controllers
-  #
   # In the example above, If BarController, or any of the views in views/bar, renders 'bar/view'
   # and it is not found then 'foo/view' is rendered (if it can be found)
   #
@@ -107,76 +96,37 @@ module Ardes#:nodoc:
     # Mixin for ActionView to enable inherit views functionality.  This module is
     # included into ActionView::Base
     module ActionView
-      extend ActiveSupport::Memoizable
-      
       def self.included(base)# :nodoc:
         base.class_eval do
-          alias_method_chain :render, :inherit_views
           alias_method :_orig_pick_template, :_pick_template
           
           def _pick_template(template_path)
-            _pick_inherited_template_for_controller(template_path, controller)
+            _orig_pick_template(template_path)
+          rescue ::ActionView::MissingTemplate
+            if controller.respond_to?(:inherit_views?) &amp;&amp; controller.inherit_views?
+              _pick_template_from_inherit_view_paths(template_path, controller.inherit_view_paths)
+            end
           end
-        end
-      end
-      
-      # Renders the parent template for the current template
-      # takes normal rendering options (:layout, :locals, etc)
-      def render_parent(options = {})
-        raise ArgumentError, 'render_parent requires that controller inherit_views' unless (controller.inherit_views? rescue false)
-        
-        if @current_render &amp;&amp; @current_render[:file] &amp;&amp; (file = _pick_inherited_template(@current_render[:file], controller.inherit_view_paths))
-          return render(options.merge(:file =&gt; file))
-        end
-        raise InheritedFileNotFound, &quot;no parent for #{@current_render[:file]} found&quot;
-      end
-
-      # Find an inherited template path prior to rendering, if appropriate.
-      def render_with_inherit_views(options = {}, local_assigns = {}, &amp;block)
-        _with_current_render_of(options.slice(:file, :partial)) do
-          render_without_inherit_views(options, local_assigns, &amp;block)
-        end
-      end
-    
-      # Find an inherited template path for a controller context
-      def inherited_template_path(template_path, controller_class = controller.class)
-        _pick_inherited_template_for_controller(template_path, controller).to_s
-      end
-    
-    private
-      def _pick_inherited_template_for_controller(template_path, controller)
-        _orig_pick_template(template_path)
-      rescue ::ActionView::MissingTemplate
-        if controller.respond_to?(:inherit_views?) &amp;&amp; controller.inherit_views?
-          _pick_inherited_template(template_path, controller.inherit_view_paths)
-        end
-      end  
-      
-      def _pick_inherited_template(template_path, inherit_view_paths)
-        # first, we grab the inherited paths that are 'above' the given template_path
-        if starting_path = inherit_view_paths.detect {|path| template_path =~ /^#{path}\//}
-          paths_above_template_path = inherit_view_paths.slice(inherit_view_paths.index(starting_path)+1..-1)
           
-          # then, search through each one, substibuting the inherited path
-          paths_above_template_path.each do |path|
-            inherited_template = begin
-              _orig_pick_template(template_path.sub(/^#{starting_path}/, path))
-            rescue ::ActionView::MissingTemplate
-              nil
+          def _pick_template_from_inherit_view_paths(template_path, inherit_view_paths)
+            # first, we grab the inherited paths that are 'above' the given template_path
+            if starting_path = inherit_view_paths.detect {|path| template_path =~ /^#{path}\//}
+              paths_above_template_path = inherit_view_paths.slice(inherit_view_paths.index(starting_path)+1..-1)
+    
+              # then, search through each path, substibuting the inherited path, returning the first found
+              paths_above_template_path.each do |path|
+                inherited_template = begin
+                  _orig_pick_template(template_path.sub(/^#{starting_path}/, path))
+                rescue ::ActionView::MissingTemplate
+                  nil
+                end
+                return inherited_template if inherited_template
+              end
             end
-            
-            return inherited_template if inherited_template
           end
+          memoize :_pick_template_from_inherit_view_paths
         end
       end
-      memoize :_pick_inherited_template
-      
-      def _with_current_render_of(options, &amp;block)
-        orig, @current_render = @current_render, options
-        yield
-      ensure
-        @current_render = orig
-      end
     end
   end  
 end
\ No newline at end of file</diff>
      <filename>lib/ardes/inherit_views.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,15 +33,5 @@ describe AController, &quot; &lt; TestController; inherit_views&quot; do
       get :in_ab
       response.body.should == 'a:in_ab'
     end
-  
-    it &quot;GET :render_parent should render a/render_parent&quot; do
-      get :render_parent
-      response.body.should == 'a:render_parent'
-    end
-  
-    it &quot;GET :inherited_template_path should render its contents&quot; do
-      get :inherited_template_path
-      response.body.should == 'b/in_ab.html.erb'
-    end
   end
 end
\ No newline at end of file</diff>
      <filename>spec/controllers/a_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,15 +38,6 @@ describe BController, &quot; &lt; TestController; inherit_views 'a'&quot; do
       get :in_abc
       response.body.should == 'b:in_abc'
     end
-
-    it &quot;GET :render_parent should render a/render_parent inside b/render_parent&quot; do
-      get :render_parent
-      response.body.should == &quot;b:render_parent(a:render_parent)&quot;
-    end
-  
-    it &quot;GET :bad_render_parent should raise ActionView::TemplateError as there is no parent to render&quot; do
-      lambda { get :bad_render_parent }.should raise_error(ActionView::TemplateError, &quot;no parent for b/bad_render_parent found&quot;)
-    end
   
     it &quot;GET :partial_in_bc should render b/partial_in_bc &amp; b/_partial_in_bc&quot; do
       get :partial_in_bc
@@ -62,10 +53,5 @@ describe BController, &quot; &lt; TestController; inherit_views 'a'&quot; do
       get :collection_in_bc
       response.body.should == 'b:collection_in_bc =&gt; b:_partial_in_bc'
     end
-    
-    it &quot;GET :partial_render_parent should render b/partial_render_parent &amp; b/_partial_render_parent &amp; a/_partial_render_parent&quot; do
-      get :partial_render_parent
-      response.body.should == 'b:partial_render_parent =&gt; b:_partial_render_parent(a:_partial_render_parent)'
-    end
   end
 end
\ No newline at end of file</diff>
      <filename>spec/controllers/b_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,13 +43,6 @@ describe CController, &quot; &lt; BController&quot; do
       get :in_c
       response.body.should == 'c:in_c'
     end
-
-    it &quot;GET :render_parent should render a/render_parent inside b/render_parent inside c/render_parent&quot; do
-      pending do
-        get :render_parent
-        response.body.should == &quot;c:render_parent(b:render_parent(a:render_parent))&quot;
-      end
-    end
   
     it &quot;GET :partial_in_bc should render b/partial_in_bc then c/_partial_in_bc&quot; do
       get :partial_in_bc
@@ -65,10 +58,5 @@ describe CController, &quot; &lt; BController&quot; do
       get :collection_in_bc
       response.body.should == 'b:collection_in_bc =&gt; c:_partial_in_bc'
     end
-    
-    it &quot;GET :partial_render_parent should render b/partial_render_parent &amp; c/_partial_render_parent &amp; b/_partial_render_parent &amp; a/_partial_render_parent&quot; do
-      get :partial_render_parent
-      response.body.should == 'b:partial_render_parent =&gt; c:_partial_render_parent(b:_partial_render_parent(a:_partial_render_parent))'
-    end
   end
 end
\ No newline at end of file</diff>
      <filename>spec/controllers/c_controller_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>spec/fixtures/views/a/inherited_template_path.html.erb</filename>
    </removed>
    <removed>
      <filename>spec/fixtures/views/a/render_parent.html.erb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>4ab74c4f152b85c6f8093cb5ae9e89009b1ddc6a</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/inherit_views/commit/fef6180fa01d55a291c5d5be0b1ff85a3879101f</url>
  <id>fef6180fa01d55a291c5d5be0b1ff85a3879101f</id>
  <committed-date>2008-09-20T22:04:39-07:00</committed-date>
  <authored-date>2008-09-20T22:04:39-07:00</authored-date>
  <message>Removed render_parent for now.  Vastly simplified internals.  All specs pass on edge</message>
  <tree>af87d43a023b9b6e6a7a3650b66dc7e14391eaec</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
