I need to convert a rails 2.3 site so that all external URLs open in a new window. I could go though every call to link_to and add :target => '_blank', but I’d like to do it in one step for all links, present and future. Is there a way I can monkey patch link_to to get the desired behaviour?
I need to convert a rails 2.3 site so that all external URLs open
Share
In the end I went with this, in an initialiser: