Patching auto_link for @username link conversion

Does anyone know of an easy way to convert a unique '@username' (i.e.
@user.username) using an auto_link-esque helper? I have a method for
doing it on the way in to the database but, I realise there's a few deal
breakers with that, such as changing the original character length of
whatever was posted (by inserting a href).

Would it be possible to patch auto_link (which I'm already using) to
work with an @username conversion? I was thinking something along these

     # File actionpack/lib/action_view/helpers/text_helper.rb, line 307
307: def auto_link(text, link = :all, href_options = {}, &block)
308: return '' if text.blank?
309: case link
310: when :all then
auto_link_email_addresses(auto_link_urls(text, href_options, &block),
311: when :email_addresses then
auto_link_email_addresses(text, &block)
312: when :urls then auto_link_urls(text,
href_options, &block)
###: when :usernames then auto_link_usernames(text,
href_options, &block)
313: end
314: end

I haven't done any patching or delving in to Rails internals before so I
don't how tricky the auto_link_usernames method would be, or, if there's
a better way. Any suggestions?

You certainly could (personally I'd probably alias_method_chain it
just to add your auto_link_usernames behaviour.
I'd also worry about getting the scanning text for usernames bit right
first before wiring it into auto_link