dimanche 1 mars 2015

How to write ruby erb tag in slim javascript?


javascript:
var flash_message = '';

- if flash.any?


$(document).ready(function(){
$(".button-collapse").sideNav();
});


I want use normal erb tag in javascript area generate by slim. If have flash message, set flash_message = html string generate by rails helper. But I can't use - if flash.any? in javascript: of slim.


Aucun commentaire:

Enregistrer un commentaire