1

Somehow I was under the impression that naming views like this was possible:

show.js.custom.coffee

Suppose I have both handlers working properly, and both show.js.custom and show.js.coffee work fine, but when I put both extensions together, Rails balks with (edited for brevity):

Missing template show with {:handlers=>[:custom, :coffee], :formats=>[:js]}...

So if this is at all possible, what is it I need to do to make it work?

Thanks!

Ivan
  • 97,549
  • 17
  • 50
  • 58

2 Answers2

0

You can also use haml in js.coffee templates by using the code from this blog post I wrote. And manipulate it for different types, just as brewster suggests.

Nico
  • 881
  • 1
  • 6
  • 19
0

yes this would be nice. much like sprockets and its preprocessing feature. i always want to parse ajax request views with view.js.coffee.haml. i have made it work with help from coffeebeans

https://github.com/markbates/coffeebeans

perhaps you could manipulate it to what you need to do as well.

brewster
  • 4,342
  • 6
  • 45
  • 67