<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/chronicle/association_collection_extensions.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -17,6 +17,7 @@ class ChronicleExtension &lt; Radiant::Extension
   def activate
     require 'chronicle/diff'
     ActiveRecord::Base::VersionsProxyMethods.class_eval { include Chronicle::VersionsProxyMethods }
+    ActiveRecord::Associations::AssociationCollection.class_eval { include Chronicle::AssociationCollectionExtensions }
     Version.class_eval { include Chronicle::VersionExtensions }
     Page.class_eval do 
       include Chronicle::PageExtensions</diff>
      <filename>chronicle_extension.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,10 @@
 module Chronicle::Tags
   include Radiant::Taggable
+  def self.included(base)
+    base.class_eval do
+      alias_method_chain :children_find_options, :draft_versioning
+    end
+  end
 
   desc %{
     Renders the snippet specified in the @name@ attribute within the context of a page.
@@ -39,4 +44,42 @@ module Chronicle::Tags
       raise StandardTags::TagError.new(&quot;`snippet' tag must contain `name' attribute&quot;)
     end
   end
+  
+  desc %{
+    Inside this tag all page related tags refer to the page found at the @url@ attribute.
+    @url@s may be relative or absolute paths.
+
+    *Usage:*
+
+    &lt;pre&gt;&lt;code&gt;&lt;r:find url=&quot;value_to_find&quot;&gt;...&lt;/r:find&gt;&lt;/code&gt;&lt;/pre&gt;
+  }
+  tag 'find' do |tag|
+    url = tag.attr['url']
+    raise TagError.new(&quot;`find' tag must contain `url' attribute&quot;) unless url
+
+    found = Page.find_by_url(absolute_path_for(tag.locals.page.url, url), !dev?(tag.globals.page.request))
+    if page_found?(found)
+      tag.locals.page = found
+      tag.expand
+    end
+  end
+
+  desc %{
+    Page attribute tags inside this tag refer to the parent of the current page.
+
+    *Usage:*
+    
+    &lt;pre&gt;&lt;code&gt;&lt;r:parent&gt;...&lt;/r:parent&gt;&lt;/code&gt;&lt;/pre&gt;
+  }
+  tag &quot;parent&quot; do |tag|
+    parent = tag.locals.page.parent.current
+    tag.locals.page = parent
+    tag.expand if parent
+  end
+  
+  def children_find_options_with_draft_versioning(tag)
+    options = children_find_options_without_draft_versioning(tag)
+    options.merge!(:current =&gt; true) if dev?(tag.globals.page.request)
+    options
+  end
 end</diff>
      <filename>lib/chronicle/tags.rb</filename>
    </modified>
    <modified>
      <diff>@@ -355,6 +355,30 @@ describe Page do
       @page = pages(:first)
     end
     
+    describe &quot;&lt;r:children:each /&gt;&quot; do
+      it &quot;should retrieve current versions of children on the dev host&quot; do
+        @page = pages(:parent)
+        @page.children.first.update_attributes(:slug =&gt; &quot;kid&quot;, :status =&gt; Status[:draft])
+        @page.should render('&lt;r:children:each by=&quot;slug&quot;&gt;&lt;r:slug /&gt; &lt;/r:children:each&gt;').as('kid child-2 child-3 ').on('dev.site.com')
+      end
+    end
+    
+    describe &quot;&lt;r:find /&gt;&quot; do
+      it &quot;should retrieve current versions of found pages on the dev host&quot; do
+        @page = pages(:parent)
+        @page.children.first.update_attributes(:slug =&gt; &quot;kid&quot;, :status =&gt; Status[:draft])
+        @page.should render('&lt;r:find url=&quot;/parent/kid&quot;&gt;&lt;r:slug /&gt;&lt;/r:find&gt;').as('kid').on('dev.site.com')
+      end
+    end
+    
+    describe &quot;&lt;r:parent /&gt;&quot; do
+      it &quot;should use the current version of the parent on the dev host&quot; do
+        @page = pages(:parent)
+        @page.update_attributes(:slug =&gt; &quot;parent-draft&quot;, :status =&gt; Status[:draft])
+        pages(:child).should render('&lt;r:parent&gt;&lt;r:slug /&gt;&lt;/r:parent&gt;').as('parent-draft').on('dev.site.com')
+      end
+    end
+    
     describe &quot;overriding &lt;r:snippet /&gt;&quot; do
       before :each do
         snippet = snippets(:first)</diff>
      <filename>spec/models/page_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2d17724b2919f48f1b02984a0e2ec92e2e60345a</id>
    </parent>
  </parents>
  <author>
    <name>Jason Garber</name>
    <email>jg@jasongarber.com</email>
  </author>
  <url>http://github.com/jgarber/radiant-chronicle-extension/commit/e7bdb91e1a2ab9d3ae6c35dc25e3fd9bfdefee84</url>
  <id>e7bdb91e1a2ab9d3ae6c35dc25e3fd9bfdefee84</id>
  <committed-date>2009-07-14T14:17:09-07:00</committed-date>
  <authored-date>2009-07-14T14:17:09-07:00</authored-date>
  <message>Make children, parent, and find Radius tags return current versions when in dev mode.</message>
  <tree>c97ff2449983669af034b45d35fdf5e1f98a4da9</tree>
  <committer>
    <name>Jason Garber</name>
    <email>jg@jasongarber.com</email>
  </committer>
</commit>
