<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -337,6 +337,10 @@ module ActionController #:nodoc:
     @@resource_action_separator = &quot;/&quot;
     cattr_accessor :resource_action_separator
     
+    # Allow to override path names for default resources' actions
+    @@resources_path_names = { :new =&gt; 'new', :edit =&gt; 'edit' }
+    cattr_accessor :resources_path_names
+
     # Sets the token parameter name for RequestForgery.  Calling #protect_from_forgery sets it to :authenticity_token by default
     cattr_accessor :request_forgery_protection_token
 </diff>
      <filename>actionpack/lib/action_controller/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -80,7 +80,9 @@ module ActionController
       end
 
       def new_path
-        @new_path ||= &quot;#{path}/new&quot;
+        new_action = self.options[:path_names][:new] if self.options[:path_names]
+        new_action ||= Base.resources_path_names[:new]
+        @new_path ||= &quot;#{path}/#{new_action}&quot;
       end
 
       def member_path
@@ -266,6 +268,13 @@ module ActionController
     #       notes.resources :attachments
     #     end
     #
+    # * &lt;tt&gt;:path_names&lt;/tt&gt; - specify different names for the 'new' and 'edit' actions. For example:
+    #     # new_products_path == '/productos/nuevo'
+    #     map.resources :products, :as =&gt; 'productos', :path_names =&gt; { :new =&gt; 'nuevo', :edit =&gt; 'editar' }
+    #
+    #   You can also set default action names from an environment, like this:
+    #     config.action_controller.resources_path_names = { :new =&gt; 'nuevo', :edit =&gt; 'editar' }
+    #
     # * &lt;tt&gt;:path_prefix&lt;/tt&gt; - set a prefix to the routes with required route variables.
     #
     #   Weblog comments usually belong to a post, so you might use resources like:
@@ -515,8 +524,14 @@ module ActionController
         resource.member_methods.each do |method, actions|
           actions.each do |action|
             action_options = action_options_for(action, resource, method)
-            map.named_route(&quot;#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}#{resource.action_separator}#{action}&quot;, action_options)
-            map.named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}#{resource.action_separator}#{action}.:format&quot;,action_options)
+            action_path = action
+            if resource.options[:path_names]
+              action_path = resource.options[:path_names][action]
+              action_path ||= Base.resources_path_names[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)
+            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)
           end
         end
 </diff>
      <filename>actionpack/lib/action_controller/resources.rb</filename>
    </modified>
    <modified>
      <diff>@@ -76,6 +76,12 @@ class ResourcesTest &lt; Test::Unit::TestCase
     end
   end
 
+  def test_override_paths_for_default_restful_actions
+    resource = ActionController::Resources::Resource.new(:messages,
+      :path_names =&gt; {:new =&gt; 'nuevo', :edit =&gt; 'editar'})
+    assert_equal resource.new_path, &quot;#{resource.path}/nuevo&quot;
+  end
+
   def test_multiple_default_restful_routes
     with_restful_routing :messages, :comments do
       assert_simply_restful_for :messages</diff>
      <filename>actionpack/test/controller/resources_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4364c361b599f99bc2345ce4eb2d145b07ed8a0f</id>
    </parent>
  </parents>
  <author>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/063c393bf0a2eb762770c97f925b7c2867361ad4</url>
  <id>063c393bf0a2eb762770c97f925b7c2867361ad4</id>
  <committed-date>2008-04-11T17:40:40-07:00</committed-date>
  <authored-date>2008-04-11T17:40:40-07:00</authored-date>
  <message>Allow alternative values for the 'new' and 'edit' actions in resourceful routes.

map.resource :schools, :as =&gt; 'escuelas', :path_names =&gt; { :new =&gt; 'nueva' }

Closes #11181.  [ivanvr]</message>
  <tree>81eda9f330faa3cebbe1a77b19a68476cfc77eac</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
