Yes it does. I agree with the two concerns you raise and have been
similarly annoyed by this clunky aspect of the API. Please pursue a
patch.
Best,
jeremy
Fred
>
> I think that's a good idea as well, and I've actually had that very
> idea myself. Not sure how link_to could be done with one option hash
> and still make sense. Perhaps something like what form_for does.
>
> link_to "Edit", :class => "important", :url => edit_post_url(@post)
>
> What do you think?
>
Well link_to_remote is currently
link_to_remote( 'Click me', {:url => {...}, :update => {'somediv'}},
{:class => 'foo'})
That would be nicer with a single hash
link_to 'Click me', :url => {...}, :html => {...}
works, but is a little more verbose for the most common case link_to
'blah', edit_post_url(@post) etc...
You could conceivably rig it so that
link_to 'Edit', some_string, some_options is interpreted as link_to
'Edit', :url => some_string, :html => some_options
but link_to 'Edit', some_hash
expects some_hash to contain :html and :url keys (and if there is
no :url key then you can assume it's old-skool.
Fred