Rails with backbone-rails: asset helpers (image_path) in EJS files

后端 未结 5 523
无人共我
无人共我 2020-12-13 11:24

I have a Rails 3.1 app that uses the codebrew/backbone-rails. In a .jst.ejs template, I would like to include an image, like so:



        
5条回答
  •  情歌与酒
    2020-12-13 11:40

    You can use corresponding Javascript helper via the following gem: https://github.com/kavkaz/js_assets

    Finally (after installing and configuring) you will be able to use it like this:

    "/>
    

提交回复
热议问题