Vote count:
0
In my rails app, I'm unable to add an image asset in my coffeescript file. The file is called 'videos.js.coffee.erb' and this is the error I'm getting:
undefined method `image_tag' for #<#<Class:0x007fc6f0068bc8>:0x007fc6f5fcd9d8>
The error occurs from the following line:
$('#images').append('<div class="placeholder video" style="background-image: none"><div style="font-size: 12px">uploading video...</div><br><%=image_tag("icons/loading.gif")%></div>');
Notably, I never had an issue with this in my app until I added the following gems to use with boostrap-sass:
gem 'bootstrap-sass', '~> 3.2.0'
gem 'sprockets-rails', '=2.0.0.backport1'
gem 'sprockets', '=2.2.2.backport2'
gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport'
Can anyone help resolve this issue?
asked 48 secs ago
Rails CoffeeScript file - add image_tag
Aucun commentaire:
Enregistrer un commentaire