DRY up link_to_remote and its url_for

In an attempt to provide a gracefully degradable link_to_remote, I
repeat myself every time:
<%= link_to_remote(‘Signup’,
{:url => {:controller => ‘user’, :action => ‘signup’}},
{:href => url_for(:controller => ‘user’, :action => ‘signup’)}) %>

Looked around the RDoc & this forum, I couldn’t see anything obvious.
Without specifying the :href, I will get a “#” for href. Anything out
there that is able to DRY the above code?


As a simple solution, you could just create your own helper…

def link_to_both text, options
link_to_remote text, options, :href => url_for( options[:url] )

link_to_both ‘Signup’, :url => { :controller => ‘user’, :action =>