RailsCasts Pro episodes are now free!

Learn more or hide this

James Summerill's Profile

GitHub User: shoutsid

Comments by James Summerill

Avatar

Over a year later and it works. Thank you :)

Avatar

Saving works, but there is no redirect when saving. Anyone else having this issue?

ruby
Mercury.on('ready', function() {
    var link = $('#mercury_iframe').contents().find('#edit_link');
    console.log("mercury ready ready", link);
    Mercury.saveUrl = link.data('save-url');
    link.hide();
});

Mercury.on('saved', function() {
    window.location.href = window.location.href.replace(/\/editor\//i, '/');
});