Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

:singular is no longer a valid option for resources [#5037 state:reso…

…lved]
  • Loading branch information...
commit 52e526a8e3ed3682ae2b774e4a328b9aa8bd6dde 1 parent 5360014
Andrew White pixeltrix authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 railties/guides/source/routing.textile
8 railties/guides/source/routing.textile
View
@@ -714,14 +714,14 @@ Rails now creates routes to the +CategoriesControlleR+.
h4. Overriding the Singular Form
-If you want to customize the singular name of the route in the named helpers, you can use the +:singular+ option.
+If you want to define the singular form of a resource, you should add additional rules to the +Inflector+.
<ruby>
-resources :teeth, :singular => "tooth"
+ActiveSupport::Inflector.inflections do |inflect|
+ inflect.irregular 'tooth', 'teeth'
+end
</ruby>
-TIP: If you want to define the singular form of a word for your entire application, you should add additional rules to the +Inflector+ instead.
-
h4(#nested-name-prefix). Using +:name_prefix+ in Nested Resources
The +:name_prefix+ option overrides the automatically-generated prefix for the parent resource in nested route helpers. For example,
Please sign in to comment.
Something went wrong with that request. Please try again.