<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -527,7 +527,7 @@ module ActionController
             action_path = action
             if resource.options[:path_names]
               action_path = resource.options[:path_names][action]
-              action_path ||= Base.resources_path_names[action]
+              action_path ||= Base.resources_path_names[action] || action
             end
 
             map.named_route(&quot;#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}#{resource.action_separator}#{action_path}&quot;, action_options)</diff>
      <filename>actionpack/lib/action_controller/resources.rb</filename>
    </modified>
    <modified>
      <diff>@@ -209,6 +209,23 @@ class ResourcesTest &lt; Test::Unit::TestCase
     end
   end
 
+  def test_member_when_override_paths_for_default_restful_actions_with
+    [:put, :post].each do |method|
+      with_restful_routing :messages, :member =&gt; { :mark =&gt; method }, :path_names =&gt; {:new =&gt; 'nuevo'} do
+        mark_options = {:action =&gt; 'mark', :id =&gt; '1', :controller =&gt; &quot;messages&quot;}
+        mark_path    = &quot;/messages/1/mark&quot;
+
+        assert_restful_routes_for :messages, :path_names =&gt; {:new =&gt; 'nuevo'} do |options|
+          assert_recognizes(options.merge(mark_options), :path =&gt; mark_path, :method =&gt; method)
+        end
+
+        assert_restful_named_routes_for :messages, :path_names =&gt; {:new =&gt; 'nuevo'} do |options|
+          assert_named_route mark_path, :mark_message_path, mark_options
+        end
+      end
+    end
+  end
+
   def test_with_two_member_actions_with_same_method
     [:put, :post].each do |method|
       with_restful_routing :messages, :member =&gt; { :mark =&gt; method, :unmark =&gt; method } do
@@ -674,11 +691,18 @@ class ResourcesTest &lt; Test::Unit::TestCase
       options[:options] ||= {}
       options[:options][:controller] = options[:controller] || controller_name.to_s
 
+      new_action    = &quot;new&quot;
+      edit_action   = &quot;edit&quot;
+      if options[:path_names]
+        new_action  = options[:path_names][:new]  || &quot;new&quot;
+        edit_action = options[:path_names][:edit] || &quot;edit&quot;
+      end
+
       collection_path            = &quot;/#{options[:path_prefix]}#{options[:as] || controller_name}&quot;
       member_path                = &quot;#{collection_path}/1&quot;
-      new_path                   = &quot;#{collection_path}/new&quot;
-      edit_member_path           = &quot;#{member_path}/edit&quot;
-      formatted_edit_member_path = &quot;#{member_path}/edit.xml&quot;
+      new_path                   = &quot;#{collection_path}/#{new_action}&quot;
+      edit_member_path           = &quot;#{member_path}/#{edit_action}&quot;
+      formatted_edit_member_path = &quot;#{member_path}/#{edit_action}.xml&quot;
 
       with_options(options[:options]) do |controller|
         controller.assert_routing collection_path,            :action =&gt; 'index'
@@ -730,15 +754,22 @@ class ResourcesTest &lt; Test::Unit::TestCase
       full_prefix = &quot;/#{options[:path_prefix]}#{options[:as] || controller_name}&quot;
       name_prefix = options[:name_prefix]
 
+      new_action  = &quot;new&quot;
+      edit_action = &quot;edit&quot;
+      if options[:path_names]
+        new_action  = options[:path_names][:new]  || &quot;new&quot;
+        edit_action = options[:path_names][:edit] || &quot;edit&quot;
+      end
+
       assert_named_route &quot;#{full_prefix}&quot;,            &quot;#{name_prefix}#{controller_name}_path&quot;,              options[:options]
       assert_named_route &quot;#{full_prefix}.xml&quot;,        &quot;formatted_#{name_prefix}#{controller_name}_path&quot;,    options[:options].merge(            :format =&gt; 'xml')
       assert_named_route &quot;#{full_prefix}/1&quot;,          &quot;#{name_prefix}#{singular_name}_path&quot;,                options[:options].merge(:id =&gt; '1')
       assert_named_route &quot;#{full_prefix}/1.xml&quot;,      &quot;formatted_#{name_prefix}#{singular_name}_path&quot;,      options[:options].merge(:id =&gt; '1', :format =&gt; 'xml')
 
-      assert_named_route &quot;#{full_prefix}/new&quot;,        &quot;new_#{name_prefix}#{singular_name}_path&quot;,            options[:options]
-      assert_named_route &quot;#{full_prefix}/new.xml&quot;,    &quot;formatted_new_#{name_prefix}#{singular_name}_path&quot;,  options[:options].merge(            :format =&gt; 'xml')
-      assert_named_route &quot;#{full_prefix}/1/edit&quot;,     &quot;edit_#{name_prefix}#{singular_name}_path&quot;,           options[:options].merge(:id =&gt; '1')
-      assert_named_route &quot;#{full_prefix}/1/edit.xml&quot;, &quot;formatted_edit_#{name_prefix}#{singular_name}_path&quot;, options[:options].merge(:id =&gt; '1', :format =&gt; 'xml')
+      assert_named_route &quot;#{full_prefix}/#{new_action}&quot;,        &quot;new_#{name_prefix}#{singular_name}_path&quot;,            options[:options]
+      assert_named_route &quot;#{full_prefix}/#{new_action}.xml&quot;,    &quot;formatted_new_#{name_prefix}#{singular_name}_path&quot;,  options[:options].merge(            :format =&gt; 'xml')
+      assert_named_route &quot;#{full_prefix}/1/#{edit_action}&quot;,     &quot;edit_#{name_prefix}#{singular_name}_path&quot;,           options[:options].merge(:id =&gt; '1')
+      assert_named_route &quot;#{full_prefix}/1/#{edit_action}.xml&quot;, &quot;formatted_edit_#{name_prefix}#{singular_name}_path&quot;, options[:options].merge(:id =&gt; '1', :format =&gt; 'xml')
 
       yield options[:options] if block_given?
     end</diff>
      <filename>actionpack/test/controller/resources_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b6aa0e13b4e590b82550a6464924f431e57229df</id>
    </parent>
  </parents>
  <author>
    <name>Eugene Pimenov</name>
    <login></login>
    <email>libc@rghost.net</email>
  </author>
  <url>http://github.com/rails/rails/commit/e6a3ce3392812f707b78d64ffb04ee52f4517d20</url>
  <id>e6a3ce3392812f707b78d64ffb04ee52f4517d20</id>
  <committed-date>2008-04-23T01:19:22-07:00</committed-date>
  <authored-date>2008-04-18T04:45:33-07:00</authored-date>
  <message>Make sure member names aren't mistakenly set to nil when providing :path_names

[#19 state:resolved]

Signed-off-by: Michael Koziarski &lt;michael@koziarski.com&gt;</message>
  <tree>17cac338027788a877e79314354a4c8777025af6</tree>
  <committer>
    <name>Michael Koziarski</name>
    <login>NZKoz</login>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
