My rails controller returns JS often, and I'm using Coffeebeans to allow me to have js.coffee views. The only problem with this is that it uses the <%= ... %>
syntax for embedded Ruby... I would ideally like to use Coffeescript/HAML style string interpolation, that is: #{..}
, and HAML style tags, i.e instead of <%= ... %>
, just use =
with proper indentation.
I would imagine this sort of syntax would best be used with file extensions js.coffee.haml . Is this possible? Simply saving my file with that extension does not work, I'm guessing Coffeebeans needs to be tweaked a bit to allow this, but I don't know what I would need to do.
This post suggested it would be possible: Chaining template handlers in Rails 3
Any suggestions on how to go about this?