javascriptruby-on-railsjammit

Rails - Jammit render javascript with ruby code


How can I render javascript files containing ruby code (<%= ... %>) using Jammit? Jammit gem will always read JS files and will not evaluate the ruby code. Solutions? Thx!


Solution

  • I couldn't find a plugin so I wrote one: https://github.com/xpepermint/js_erb