jferris / effigy

Ruby views without a templating language
http://rdoc.info/projects/jferris/effigy
MIT License
206 stars 6 forks source link

Option to bring back HTML with no DOCTYPE #11

Closed croaky closed 14 years ago

croaky commented 14 years ago

Right now, rendering with Effigy brings back the DOCTYPE, html, and body tags. My use case is on an Ajax call which just returns an HTML fragment that jQuery then replaces in the DOM. The extra tags around it messes up.

My current hack is:

def output
  current_context.to_html.sub(/.*<body>/, '').sub(/<\/body>.*/, '')
end
jferris commented 14 years ago

Fixed by 978fd82e42212ead3b5691a71381135de4419229