On Oct 13, 10:14 am, Neil Cauldwell <[EMAIL PROTECTED]>
wrote:
> 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
> lines;

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

Fred

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to