spree/spree — pull request #734 by humancopy (2011-11-06 07:50:42+00:00)
Title: Fix impossible defacing of new actions where there are both JS & HTML responders (e.g. admin/products/new)

Currently it is not possible to deface AJAX calls which render an HTML view with the same name. I was trying to deface **admin/products/new** but was unable because of this. The solution I found was to move the **new** code to a **_new** partial.

This way it is possible to deface as follows:
```Deface::Override.new(
:virtual_path => "admin/products/_new",
:name => "defacing_new",
:insert_bottom => "[data-hook='new_product_attrs']",
:partial => "Defaced. :)",
:disabled => false
)```

This works well in both JS & HTML responses. :)