Validate HAML from ActiveRecord: scope/controller/helpers for link_to etc?
- by Chris Boyle
I like HAML. So much, in fact, that in my first Rails app, which is the usual blog/CMS thing, I want to render the body of my Page model using HAML. So here is app/views/pages/_body.html.haml:
.entry-content= Haml::Engine.new(body, :format => :html5).render
...and it works (yay, recursion). What I'd like to do is validate the HAML in the body…