I want replace in *.erb files tag using spree/deface library in rails. Replacing work fine. But I want get override string before it will override and get attribute "name" for example. I want use some attribute from old string in new string. For example: i want replace <img class="deface" name="anyname" src="#"> on <h1>anyname</h1>
"anyname" - different for every tag.
I dont find this feature in documentation. I try search something in library code, but my skill in ruby is not high. I try use <%= render_original %> placeholder for :surround action, but it not contain surrounding string. Maybe i am wrong.