On 26/02/2006, at 3:14 PM, Michael Koziarski wrote:
form_for : comment, comment, :action => 'update' do; end
=> <form action="/comments/update" method="post">
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, named_route_url do; end
throws an error because it expects a hash instead of a string as the
3rd param.
...but even after handling that case its ugly having all the options
mashed together in the one hash. What if, for example, you wanted to
use a cgi param named 'html' or 'builder'?
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'
=> 'some-form' }, :builder => LabellingFormBuilder
-- tim
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core