Open ShaneNZ opened 11 years ago
On testing, Ruby comments seem to work as expected. However, I think we need to "support" HTML commenting as well for front end devs to debug with.
What's happening here is that Rails processes the ERB <% %> tags first, then inserts the partial in the page when it's done. The HTML comments aren't processed until the assembled page reaches the browser. So if there's an error in a field, the HTML comments won't be used in time to prevent it – at the point where it breaks, Rails doesn't know the HTML comments are there.
Changing this would be... "horrendous" is the first adjective that comes to mind. What we could aim for is providing better guidance. The current version of Breeze (not sure about the older version you're using) has a little help guide on the side which currently doesn't say anything about comments.
Based on above comment (very true) and after discussion with Isaac, we've come to:
Given a custom type with fields `text' but not 'desc', and a partial with the following code:
The partial errors out in the page over the
desc
field, despite it being commented out. Ideal behaviour is to substitute the content type data where the field exists, but allow for failing silently if the field is HTML commented as above.