[Rails-core] Re: namespacing breaks polymorphic_url

2007-06-08 Thread Trevor Squires
Koz, I'm not assuming *any* malice or enterpriseyness here at all. I *know* that everyone has the best of intentions and that everyone involved in this is smart (in case that is being called into question but not being stated). So in order to ensure the technical content of what I'm saying isn'

[Rails-core] Re: namespacing breaks polymorphic_url

2007-06-08 Thread Michael Koziarski
> It's really frustrating to see how much stuff is being bolted on here. While you may find this particular situation frustrating, I think it's important to remember that everyone here is trying to achieve the same thing. A kickass web development framework. I definitely think we need to be cau

[Rails-core] Re: namespacing breaks polymorphic_url

2007-06-08 Thread Trevor Squires
It's really frustrating to see how much stuff is being bolted on here. I've already written at length about how edge-cases (poly* resources) are being allowed to infect simpler cases: http://rubyurl.com/jzN And with this suggestion it just keeps getting worse. By far the simplest and most comm

[Rails-core] Re: namespacing breaks polymorphic_url

2007-06-08 Thread Josh Knowles
On 6/8/07, Dan Kubb <[EMAIL PROTECTED]> wrote: > > > > > I was thinking that a syntax like the following might work though: > > # routes.rb > map.namespace :admin do |a| >a.resources :workshops do |w| > w.resources :sessions >end > end > > # views > <%= url_for([:admin, @workshop, @ses

[Rails-core] Re: namespacing breaks polymorphic_url

2007-06-08 Thread Tobias Lütke
I'd apply a patch which would Dan's style work. Please do investigate :) > > # routes.rb > map.namespace :admin do |a| >a.resources :workshops do |w| > w.resources :sessions >end > end > > # views > <%= url_for([:admin, @workshop, @session]) %> > <%= link_to('Session', [:admin, @wor

[Rails-core] Re: namespacing breaks polymorphic_url

2007-06-08 Thread Dan Kubb
Hi Josh, > I'm currently using map.namespace to set the name_prefix to > "admin/". Doing this appears to break polymorphic_url (and thus > form_for, url_for, etc) as it isn't taking name_prefix into > account. Quick hack would be to allow polymorphic_url to accept a > namespace or name_