leshill / handlebars_assets

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

Add support for .ember.hbs extension, so Rails won't generate funny URLs #78

Closed Darep closed 11 years ago

Darep commented 11 years ago

A fix for multiple framework support in Rails, when not using haml or slim. You can now use a .ember.hbs file extension, e.g. some-cool-template.ember.hbs.

Colophon: Currently, it seems that if you're not using haml or slim, the files have to have a .hbs.ember extension to get the multiple framework support to work. Unfortunately, in dev environment, Rails creates the URLs to files (templates) with a .ember.js extension, which doesn't match. So Rails returns a 404, because it generated a funky path.

:hamburger:

PS. handlebars_assets still accepts files with just .ember extension, eventho' it doesn't seem to work atleast in Rails.

leshill commented 11 years ago

Hi @Darep,

Merged.

Thanks!