Wondering if it's possible to process HAML from database entries. My model currently processes HTML just fine, but I'd rather input HAML, and have the view process it into HTML.
If your view is being replaced entirely by something coming from your model/database, you can use render :inline
to process it:
render :inline => @model.haml, :type => 'haml', :layout => true
Haml can be used programmatically: http://haml.info/docs/yardoc/Haml/Engine.html
There isn't enough detail in your question for me to give a more specific answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With