vendor/assets/javascripts/flash.js.erb in cacheable_flash-0.3.4 vs vendor/assets/javascripts/flash.js.erb in cacheable_flash-1.0.0

- old
+ new

@@ -2,21 +2,21 @@ var Flash = new Object(); Flash.data = {}; Flash.transferFromCookies = function() { - var data = JSON.parse(unescape($.cookie("flash") || '{}')); + var data = JSON.parse(unescape(Cookies.get("flash") || '{}')); if(!data) data = {}; Flash.data = data; - $.cookie('flash', null, {path: '/', domain: '<%=CacheableFlash::Config.config[:domain]%>'}); + Cookies.set('flash', null, {path: '/', domain: '<%=CacheableFlash::Config.config[:domain]%>'}); }; Flash.writeDataTo = function(name, element, callback) { element = $(element); var message = ""; if (Flash.data[name]) { message = Flash.data[name].toString().replace(/\+/g, ' '); - element.text(message); + element.html(message); if (callback && typeof(callback) === 'function') { callback(element); } else { element.show(); }