<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -524,11 +524,9 @@ module ActionController
         resource.member_methods.each do |method, actions|
           actions.each do |action|
             action_options = action_options_for(action, resource, method)
-            action_path = action
-            if resource.options[:path_names]
-              action_path = resource.options[:path_names][action]
-              action_path ||= Base.resources_path_names[action] || action
-            end
+
+            action_path = resource.options[:path_names][action] if resource.options[:path_names].is_a?(Hash)
+            action_path ||= Base.resources_path_names[action] || action
 
             map.named_route(&quot;#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}#{resource.action_separator}#{action_path}&quot;, action_options)
             map.named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}#{resource.action_separator}#{action_path}.:format&quot;,action_options)</diff>
      <filename>actionpack/lib/action_controller/resources.rb</filename>
    </modified>
    <modified>
      <diff>@@ -226,6 +226,28 @@ class ResourcesTest &lt; Test::Unit::TestCase
     end
   end
 
+  def test_member_when_changed_default_restful_actions_and_path_names_not_specified
+    default_path_names = ActionController::Base.resources_path_names
+    ActionController::Base.resources_path_names = {:new =&gt; 'nuevo', :edit =&gt; 'editar'}
+
+    with_restful_routing :messages do
+      new_options = { :action =&gt; 'new', :controller =&gt; 'messages' }
+      new_path = &quot;/messages/nuevo&quot;
+      edit_options = { :action =&gt; 'edit', :id =&gt; '1', :controller =&gt; 'messages' }
+      edit_path = &quot;/messages/1/editar&quot;
+
+      assert_restful_routes_for :messages do |options|
+        assert_recognizes(options.merge(new_options), :path =&gt; new_path, :method =&gt; :get)
+      end
+
+      assert_restful_routes_for :messages do |options|
+        assert_recognizes(options.merge(edit_options), :path =&gt; edit_path, :method =&gt; :get)
+      end
+    end
+  ensure
+    ActionController::Base.resources_path_names = default_path_names
+  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
@@ -691,11 +713,11 @@ 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;
+      new_action    = ActionController::Base.resources_path_names[:new] || &quot;new&quot;
+      edit_action   = ActionController::Base.resources_path_names[:edit] || &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;
+        new_action  = options[:path_names][:new] if options[:path_names][:new]
+        edit_action = options[:path_names][:edit] if options[:path_names][:edit]
       end
 
       collection_path            = &quot;/#{options[:path_prefix]}#{options[:as] || controller_name}&quot;</diff>
      <filename>actionpack/test/controller/resources_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8ded457b1b31b157d6fe89b553749579e5ac4a27</id>
    </parent>
  </parents>
  <author>
    <name>Marcos Arias</name>
    <email>markus@agil-e.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/2c39836dc3c06813fce031d1bb390149b53ebd1c</url>
  <id>2c39836dc3c06813fce031d1bb390149b53ebd1c</id>
  <committed-date>2008-05-06T02:48:07-07:00</committed-date>
  <authored-date>2008-05-05T00:53:30-07:00</authored-date>
  <message>Refactored and fixed Resources.map_member_actions to make use of custom ActionController::Base.resources_path_names when the option :path_names is not directly specified. Added a specific test for this functionality and fixed assert_restful_routes_for test helper to make use of ActionController::Base.resources_path_names instead of just &quot;new&quot; or &quot;edit&quot;.

Signed-off-by: Michael Koziarski &lt;michael@koziarski.com&gt;
[#111 state:resolved]</message>
  <tree>84a6e5a1f873ed3eedebc5722890a4a7adabbf41</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
