railsdog/deface — Issue #10: support action like :enclose or :wrap_with
Author: tomash
Created: 2011-10-23 20:25:28+00:00
State: open

It would be very useful to have a syntax in Deface allowing to wrap around a selector-matching element with some two-part code.
The obvious usecases:
* wrapping with conditionals
* wrapping with cache block (fragment cache)

Actually the second usecase would make it an awesome addition.

I have no idea for the syntax extension. How about

:text => '<% if(true) %>{original}<% end %>'

at least for now?

I don't know how hard would it be to wrap my head around Deface codebase, but in case I succeed, are you open to pull requests?