Re: [Rails-core] form_for changes break named routes

2006-02-25 Thread Tim Lucas
I'll file a bug with some tests but for now the patch is below. http://dev.rubyonrails.org/ticket/3962 -- tim ___ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core

Re: [Rails-core] form_for changes break named routes

2006-02-25 Thread Tim Lucas
Other helpers use the :url and :html option convention (remote_form_tag comes to mind)... and considering you have to handle builder options, url options and html options I think the old API is the cleanest syntax: form_for :comment, comment, :url => named_route_url, :html => { 'id' => 's

Re: [Rails-core] form_for changes break named routes

2006-02-25 Thread Tim Lucas
On 26/02/2006, at 3:14 PM, Michael Koziarski wrote: form_for : comment, comment, :action => 'update' do; end => I can see that it's broken, but why do you think it needs to be reverted? Well for one, the current implementation can't handle named routes. form_for : comment, comment, n

Re: [Rails-core] form_for changes break named routes

2006-02-25 Thread Michael Koziarski
> form_for : comment, comment, :action => 'update' do; end > => > > ...hence why I was asking what you wanted to do with it. I think it > needs to be reverted to the old API. I can see that it's broken, but why do you think it needs to be reverted? > http://dev.rubyonrails.org/browser/trunk

Re: [Rails-core] form_for changes break named routes

2006-02-25 Thread Tim Lucas
On 26/02/2006, at 3:18 AM, David Heinemeier Hansson wrote: No love for those using named routes and form_for in trunk? form_for(:comment, comment, new_comment_url (article.hash_for_permalink)) do |f| => can't convert Symbol into String also the docs are no longer valid as it doesn't us

Re: [Rails-core] form_for changes break named routes

2006-02-25 Thread David Heinemeier Hansson
> No love for those using named routes and form_for in trunk? > > form_for(:comment, comment, new_comment_url > (article.hash_for_permalink)) do |f| > => can't convert Symbol into String > > also the docs are no longer valid as it doesn't use :url => {} form_for( :comment, comment, :ur

[Rails-core] form_for changes break named routes

2006-02-24 Thread Tim Lucas
No love for those using named routes and form_for in trunk? form_for(:comment, comment, new_comment_url (article.hash_for_permalink)) do |f| => can't convert Symbol into String also the docs are no longer valid as it doesn't use :url => {} def form_for(object_name, object, optio