<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -131,8 +131,9 @@ class CodeComment &lt; ActiveRecord::Base
   # Takes two versions, and exports the second one.
   def export v1, v2
     Dir.chdir(RAILS_ROOT + &quot;/code&quot;)
-    @file = File.new(self.owner.code_file.full_name, 'r')
-    if self.owner.code_file.full_name[-3..-1] == '.rb'
+    file_name = self.owner.code_file.try(:full_name) || self.owner.in_files.first.code_file.full_name
+    @file = File.new(file_name, 'r')
+    if file_name[-3..-1] == '.rb'
       if v1.nil? &amp;&amp; owner.is_a?(CodeFile)
         # v1 is nil and owner is a file, just throw it at start at file
         file_body = inject_at_file_start v2.body
@@ -162,7 +163,7 @@ class CodeComment &lt; ActiveRecord::Base
       # This is not a .rb file. Assume its a readme and jsut throw that shit in
       file_body = v2.body
     end
-    @file = File.new(self.owner.code_file.full_name, 'w')
+    @file = File.new(file_name, 'w')
     @file.puts(file_body)
     @file.close
     </diff>
      <filename>app/models/code_comment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 &lt;h2 id=&quot;title&quot;&gt;
-  &lt;%= @main_object.name %&gt;
+  &lt;%= @main_object.name if @main_object %&gt;
 &lt;/h2&gt;
 &lt;div id=&quot;documentation&quot;&gt;
   &lt;%= render(:partial =&gt; 'show_comment', :locals =&gt; {:object =&gt; @main_object}) if @main_object%&gt;</diff>
      <filename>app/views/documentation/show_file.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,9 @@ class Rake::RDocTask
      task :rdoc do
        require 'rdoc/rdoc'
        require &quot;#{File.dirname(__FILE__)}/../parsing&quot;
-       RDoc::RDoc.new.import!(rdoc_files.to_a)
+       rdoc = RDoc::RDoc.new
+       rdoc.import!(rdoc_files.to_a)
+       rdoc.set_main_comment(main)
      end
      self
    end</diff>
      <filename>lib/tasks/site.rake</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>config/docbox.yml</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>505d8a9f5a8c4f9612fc33335858a89df11b282a</id>
    </parent>
  </parents>
  <author>
    <name>Ian Ownbey</name>
    <email>imownbey@gmail.com</email>
  </author>
  <url>http://github.com/iownbey/docbox/commit/7faf34bb5f6a7d2da94912bfa45dbba83bd1e35c</url>
  <id>7faf34bb5f6a7d2da94912bfa45dbba83bd1e35c</id>
  <committed-date>2008-11-07T13:32:58-08:00</committed-date>
  <authored-date>2008-11-07T13:32:58-08:00</authored-date>
  <message>Fixed bugs with modules and classes that dont have comments off the bat</message>
  <tree>4cf8b60da4e8b080af9b6ef3ed7d06ceb2f7e522</tree>
  <committer>
    <name>Ian Ownbey</name>
    <email>imownbey@gmail.com</email>
  </committer>
</commit>
