<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,6 +23,7 @@ module Merb
         #   resource.
         # :keys&lt;Array&gt;:
         #   A list of the keys to be used instead of :id with the resource in the order of the url.
+        # :singular&lt;Symbol&gt;
         #
         # ==== Block parameters
         # next_level&lt;Behavior&gt;:: The child behavior.
@@ -68,7 +69,7 @@ module Merb
         def resources(name, *args, &amp;block)
           name       = name.to_s
           options    = extract_options_from_args!(args) || {}
-          singular   = Extlib::Inflection.singularize(name)
+          singular   = options[:singular] ? options[:singular].to_s : Extlib::Inflection.singularize(name)
           klass      = args.first ? args.first.to_s : Extlib::Inflection.classify(singular)
           keys       = [ options.delete(:keys) || :id ].flatten
           params     = { :controller =&gt; options.delete(:controller) || name }</diff>
      <filename>lib/merb-core/dispatch/router/resources.rb</filename>
    </modified>
    <modified>
      <diff>@@ -138,6 +138,15 @@ describe &quot;When generating URLs,&quot; do
       url(:user_foo, :user_id =&gt; 2, :foo =&gt; &quot;foo-123&quot;).should == &quot;/users/2/foo-123&quot;
     end
     
+    it &quot;should allow the singular name to be set&quot; do
+      Merb::Router.prepare do
+        resources :blogposts, :singular =&gt; :blogpoost
+      end
+      
+      url(:blogposts).should == &quot;/blogposts&quot;
+      url(:blogpoost, 1).should == &quot;/blogposts/1&quot;
+    end
+    
   end
   
   describe &quot;a resource object route&quot; do</diff>
      <filename>spec/public/router/generation/resources_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>59a2e88f92eaeab86817b933d63d272e02f17213</id>
    </parent>
  </parents>
  <author>
    <name>Carl Lerche</name>
    <email>carllerche@mac.com</email>
  </author>
  <url>http://github.com/wycats/merb-core/commit/62bbcc46c28e3921a1efb43b02da4f20b51d080e</url>
  <id>62bbcc46c28e3921a1efb43b02da4f20b51d080e</id>
  <committed-date>2008-09-30T10:48:29-07:00</committed-date>
  <authored-date>2008-09-30T10:48:29-07:00</authored-date>
  <message>Added a :singular option to resource route building</message>
  <tree>9a007532d61fbb479a5a380abe9388c8b2590048</tree>
  <committer>
    <name>Carl Lerche</name>
    <email>carllerche@mac.com</email>
  </committer>
</commit>
