RailsCasts Pro episodes are now free!

Learn more or hide this

DavidBischoff's Profile

GitHub User: DavidBischoff

Comments by

Avatar

With mercury 0.9 the posted js didnt work for me anymore so I tried araound a bit... This works for me, maybe somebody needs this,...

javascript
jQuery(window).on('mercury:ready', function() {
        var saveUrl = $("#edit_link").data("save-url");
        Mercury.saveUrl = saveUrl;
});
Mercury.on('saved', function() {
        window.location.href = window.location.href.replace(/\/editor\//i, '/');
});