alexspeller / emblem-rails

Emblem.js integration with rails asset pipeline
MIT License
34 stars 21 forks source link

Register engine with app isntead of Sprockets #19

Closed mikepack closed 10 years ago

mikepack commented 10 years ago

I'm running a Rails 4 app that doesn't work properly with emblem-rails, and I've identified the issue. With the original code, registering the engine with Sprockets directly doesn't pick up any .emblem files. By registering the engine with app.assets, it works properly.

Note that ember-rails uses app.assets, so I figured this change should be safe.

kurtisnelson commented 10 years ago

:+1: I was battling this and this patch fixes things.

machty commented 10 years ago

I've seen the conditional that gets for ::Rails::VERSION::MAJOR == 4 in a number of places and I'm wondering why this suddenly (or not?) isn't doing the trick any longer... do yall have any idea why?

zda commented 10 years ago

Was having the same issue (no .emblem files getting precompiled), and this fixed it for me too. Rails 4.0.1.

alexspeller commented 10 years ago

Looks like it works, not sure why the old way broke but will merge as it solves a real problem apparently.

alexspeller commented 10 years ago

New version 0.2.1 now available on rubygems