:path_replace (original patch)
:path_substitute (current patch)
:path (apparently would confuse)
> One of my plugins has this feature and I call it :opaque_name. I
> chose 'opaque' because to me, that's exactly what it is - a name
> that doesn't let you "see through" to the underlying resource naming
> structure.
>
> map.resources :tutors, :opaque_name => :tutores
> tutors_path() => /tutores
Why not just
map.resources :tutors, :as => :tutores
?
The id in a nested route is still tutors_id isn't it, internally there
are only tutors right?
-- fxn
Why not just
map.resources :tutors, :as => :tutores
It's not even the path, it's the portion of the path for this segment
of the declaration
map.resources :people, :other_name=>'folks' do |folks|
folks.resources :comments
end
all I can see is :name_of_path_segment or path_segment_name...
> So I just want to finish by saying (/me bangs his fist on the table) that
> this bike shed *must* be blue![*]
My shed is pink[1] therefore this one must be too!
--
Cheers
Koz
[1] http://www.flickr.com/photos/koz/31291186/in/set-698503/
all I can see is :name_of_path_segment or path_segment_name...
My shed is pink[1] therefore this one must be too!
> Can't the same thing be accomplished with:
>
> map.resources :productos, :controller => :products
That gives new_productos_path, :producto_id in nested routes, .... It
is assumed in this thread you don't want that. You only want to get
fake URLs so to speak.
-- fxn
map.resources :people, :other_names => ['folks', 'gentes','personoj']
do |person|
person.resources :comments
end
This pattern can support multiple aliasing in segment paths for people
who need to translate urls into more than one alternate language.
-Trek
> I'd just suggest letting :other_name (or whatever the correct term
> shakes out to be) take an array
>
> map.resources :people, :other_names => ['folks', 'gentes','personoj']
> do |person|
> person.resources :comments
> end
If there's one choice products_path generates /productos always.
Having an array implies being able to select its elements in named
routes. I don't know whether such generality responds to a real need
and it's worth the trouble, but in any case I'd like to point out it
is not enough, it would need perhaps a hash so that you can say
projects_path(:es).
-- fxn