From cf6734fdf9d72bfc7fe92e36bf603d67ad815e6b Mon Sep 17 00:00:00 2001 From: Rizwan Reza Date: Mon, 29 Mar 2010 05:45:32 +0430 Subject: Add more tests and docs to uncountable routes. [#3930 state:resolved] --- actionpack/lib/action_dispatch/routing/mapper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index fa64a2f1d0..8a84afd315 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -425,10 +425,11 @@ module ActionDispatch singular end + # Checks for uncountable plurals, and appends "_index" if they're. def collection_name uncountable? ? "#{plural}_index" : plural end - + def uncountable? singular == plural end -- cgit v1.2.3