<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -785,11 +785,12 @@ module Ardes#:nodoc:
       def load_enclosing_resource_from_specification(spec)
         spec.segment == route_enclosing_names[enclosing_resources.size].first or ResourcesController.raise_resource_mismatch(self)
         returning spec.find_from(self) do |resource|
-          add_enclosing_resource(resource, spec.name, :name_prefix =&gt; spec.name_prefix, :is_singleton =&gt; spec.singleton?, :as =&gt; spec.as )
+          add_enclosing_resource(resource, :name =&gt; spec.name, :name_prefix =&gt; spec.name_prefix, :is_singleton =&gt; spec.singleton?, :as =&gt; spec.as)
         end
       end
       
-      def add_enclosing_resource(resource, name, options = {})
+      def add_enclosing_resource(resource, options = {})
+        name = options[:name] || resource.class.name.underscore
         update_name_prefix(options[:name_prefix] || (options[:name_prefix] == false ? '' : &quot;#{name}_&quot;))
         enclosing_resources &lt;&lt; resource
         enclosing_collection_resources &lt;&lt; resource unless options[:is_singleton]</diff>
      <filename>lib/ardes/resources_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>93b29a469bf994434f3e661f29fefc5f51bd4109</id>
    </parent>
  </parents>
  <author>
    <name>Tom Stuart</name>
    <email>tom@e-consultancy.com</email>
  </author>
  <url>http://github.com/ianwhite/resources_controller/commit/2f95de2f45f9093108150df702a7e7dbe569ab18</url>
  <id>2f95de2f45f9093108150df702a7e7dbe569ab18</id>
  <committed-date>2008-10-09T08:53:03-07:00</committed-date>
  <authored-date>2008-10-09T08:42:59-07:00</authored-date>
  <message>Changed add_enclosing_resource arguments to allow implicit resource name (inferred from its class)</message>
  <tree>df84cc775e82eaf8be2167318d6f1ff39fb32f1e</tree>
  <committer>
    <name>Tom Stuart</name>
    <email>tom@e-consultancy.com</email>
  </committer>
</commit>
