leshill / handlebars_assets

Use handlebars.js templates with the Rails asset pipeline.
MIT License
648 stars 159 forks source link

handlebars_assets with backbone AND ember... #58

Closed dgdosen closed 10 years ago

dgdosen commented 11 years ago

We have a web site that has several "mini apps" that currently use backbone over rails, leveraging handlebars_assets.

We're wanting to add to this app (might not be an ideal solution) so that our new "mini apps" work with ember instead of backbone.

I'm having problems getting handlebars_assets to play nice in that environment. On one hand, I can get the backbone app to work as it has in the past.

To get ember to work properly, I need an initializer for Handlebars that's configured to help ember, but that changes how the backbone templates are loaded, thereby breaking them.

Is there a way to set how handlebars_assets compiles templates so that both client front ends are happy?

Thanks for any ideas...

leshill commented 11 years ago

Hi @dgdosen,

The config switch is global, so supporting both is not possible without a patch. A quick look shows that having something like recognized a file extension of .ember seems like a reasonable patch to make. Do you want to try it?

dgdosen commented 11 years ago

haven't forgot about this... I should have some time between now and Monday (4/22)

AlexRiedler commented 10 years ago

Fixed by #74 , closing.