railsdog/deface — Issue #20: Deface does not work with .js.erb template rendering .html.erb template
Author: hubertlepicki
Created: 2012-01-26 20:24:01+00:00
State: open

I have just tried to customize this template in Spree: https://github.com/spree/spree/blob/master/core/app/views/spree/admin/products/new.html.erb

It can be loaded in 2 ways:
1. By going directly to /admin/products/new - then loads properly and deface works as expected
2. By loading via AJAX, then it's rendered indirectly, via https://github.com/spree/spree/blob/master/core/app/views/spree/admin/products/new.js.erb

Problem is with 2nd case: deface cannot handle it and original template is rendered within javascript template.