JC: fixed ERB bug in new/edit views. spec passes.
JC: fixed bug in edit view.