sstephenson / sprockets

Rack-based asset packaging system
2.55k stars 24 forks source link

Sprockets 3.0.1 evaluate functionality #721

Closed mirzali closed 8 years ago

mirzali commented 9 years ago

I have a site that supports multiple locales, each of which for, I generate a custom JS file.

In the past I was able to accomplish this via the evaluate method:

<% I18n.locale = :'en-gb' %>         
<%= evaluate('./generator').html_safe %>

The 'generator' is just an .js.erb file, which includes all the necessary things for a locale.

However, in the last Sprockets version, it seems as that functionality is gone. So I would need to know, if there is a different way of achieving this.

Thanks

vihai commented 9 years ago

I have the same issue, I need to save the evaluated data, what's the proper approach now?

schneems commented 9 years ago

If this is still an active issue can you close this one and re-open it at http://github.com/rails/sprockets. Active development has moved to that repo.

If you've got a bug with sprockets 3 please make sure you've tried the latest 3.3.3. If you can confirm this is still an active issue, the fastest way to get it fixed is to create a small example app that reproduces the failure and open an issue in the new repo http://github.com/rails/sprockets.

rafaelfranca commented 8 years ago

This issue was moved to rails/sprockets#181