Title / Description
Code def to_link(member_id='default-member') # UGLY - change later doc = Hpricot(code) link = doc.search('a').first[:href] link = " href=\"#{link}#{retailer.broker.member_id_template}=#{member_id}\"" code.gsub(/<(.*?)>/) {|innards| innards.gsub(/ href=("|').*?\1/, link) } end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code