<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,13 +9,8 @@ module ActionView #:nodoc:
       # All layout files must be in app/views/layouts.
       def inside_layout(layout, &amp;block)
         binding = block.binding if BINDING_REQUIRED
-
-        layout = Dir.entries(&quot;#{RAILS_ROOT}/app/views/layouts&quot;).detect { |a| /#{layout}/.match(a) }
         @template.instance_variable_set('@content_for_layout', capture(&amp;block))
-        concat(
-          @template.render(:file =&gt; &quot;#{RAILS_ROOT}/app/views/layouts/#{layout}&quot;, :user_full_path =&gt; true),
-          binding
-        )
+        concat(@template.render(:file =&gt; @template.view_paths.find_template(layout, :html), :user_full_path =&gt; true), binding)
       end
 
       # Wrap part of the template into inline layout.</diff>
      <filename>lib/nested_layouts.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a75de05e0bf300c62ec3c42082bc944f11339b05</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </author>
  <url>http://github.com/radar/nested-layouts/commit/59471811b6a6bd51b922791616f7e242e5fa03be</url>
  <id>59471811b6a6bd51b922791616f7e242e5fa03be</id>
  <committed-date>2009-10-06T20:23:50-07:00</committed-date>
  <authored-date>2009-10-06T20:23:50-07:00</authored-date>
  <message>Use Rails to find the correct template to render.</message>
  <tree>03466970eacb161002b8aab3222cb3306a7df638</tree>
  <committer>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </committer>
</commit>
