[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-02-02 Thread Mislav Marohnić
After :path_segment got a +1 from Koz, myself, Balaji and Jerome, this patch gets applied by Jeremy using :as. So much for community input =P http://dev.rubyonrails.org/changeset/8785 I'm just kidding -- if it had to be any other name among the suggested, I'd choose :as. I'm glad that this is fina

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-28 Thread blj
http://en.wikipedia.org/wiki/URI_scheme defines it as segment, so perhaps we should call it just :path_segment. I shall give it another day for feedback before I update the patch. Thank you all --~--~-~--~~~---~--~~ You received this message because you are subsc

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-27 Thread Juanjo Bazán
I would suggest :name_in_path as the name for the key. I think the meaning of map.resources :products, :other_name=>'productos' do is not inferred directly, but map.resources :products, :name_in_path=>'productos' do is (almost) self-explanatory --~--~-~--~~~---~--~

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-27 Thread blj
On Jan 27, 8:41 pm, Trek Glowacki <[EMAIL PROTECTED]> wrote: > 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 > I am not

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-27 Thread Xavier Noria
On Jan 27, 2008, at 4:41 PM, Trek Glowacki wrote: > 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 choic

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-27 Thread Trek Glowacki
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 This pattern can support multiple aliasing in segment paths for people who ne

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-27 Thread Xavier Noria
On Jan 27, 2008, at 3:18 PM, James H. wrote: > 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

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-27 Thread James H.
Can't the same thing be accomplished with: map.resources :productos, :controller => :products James On Jan 26, 6:56 am, blj <[EMAIL PROTECTED]> wrote: > http://dev.rubyonrails.org/ticket/10578 > > This is a +3 patch that would add an option :path_substitute > (originally :path_replace) to map.r

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-27 Thread blj
I feel :path_segment is not quite intuitive for a non-native English speaker (the likely user of the patch). anyway if I can have 2 votes +1 :path +1 :path_segment On Jan 27, 7:30 am, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > > As for path_name, I disagree. It's not the name of the path

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Mislav Marohnić
On Jan 27, 2008 3:30 AM, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > all I can see is :name_of_path_segment or path_segment_name... +1 for "path_segment". > My shed is pink[1] therefore this one must be too! Guys, guys! The shed should be #E0115F, and that's final. =) --~--~-~-

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Michael Koziarski
> As for path_name, I disagree. It's not the name of the path, it *is* the > path (if you interpret path as something that is prefixed with path_prefix). 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 |folk

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Trevor Squires
Mislav, I used 'opaque' as related to "not transparent". I was frustrated that map.resources enforced such a tight coupling with param names and generated url helpers that I found myself wishing: "why isn't there an easy way to make the URLs more opaque?". Perhaps being able to "see through the

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Mislav Marohnić
On Jan 26, 2008 8:01 PM, Xavier Noria <[EMAIL PROTECTED]> wrote: > > Why not just > > map.resources :tutors, :as => :tutores It looks too much like polymorphic stuff in Rails. And it does not imply that only paths are affected. And Trevor, I don't like "opaque_name", either. I don't see how o

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Trevor Squires
Well, this isn't my patch so I can't speak for the author, but when I added that feature to my plugin I did consider :as - but I discarded it because it didn't seem communicate exactly what would happen. If you didn't know about the feature and you saw: map.resources :tutors, :as => :tutores You

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Trevor Squires
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 Regards, Tre

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Xavier Noria
On Jan 26, 2008, at 7:55 PM, Trevor Squires wrote: > 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 :tu

[Rails-core] Re: +3 patch needs a better name for an options key passed to map.resources

2008-01-26 Thread Mislav Marohnić
On Jan 26, 2008 12:56 PM, blj <[EMAIL PROTECTED]> wrote: > > People liked the patch but were > wondering what the key should be > called as? > > :path_replace (original patch) > :path_substitute (current patch) > :path (apparently would confuse) We're cha