Skip to content

Instantly share code, notes, and snippets.

@chandresh
Created January 9, 2012 01:39
Show Gist options
  • Save chandresh/1580495 to your computer and use it in GitHub Desktop.
Save chandresh/1580495 to your computer and use it in GitHub Desktop.
$(window).bind('mercury:ready', function() {
var link = $('#mercury_iframe').contents().find('#edit_link');
Mercury.saveURL = link.data('save-url');
link.hide();
});
$(window).bind('mercury:saved', function() {
window.location = window.location.href.replace(/\/editor\//i, '/');
});
@chandresh
Copy link
Author

@cthree
Copy link

cthree commented Jan 9, 2012 via email

@chandresh
Copy link
Author

:)

@chandresh
Copy link
Author

For those who read this; please add to your Gemfile, as commented by cthree on main discussion of the issue:

gem 'mercury-rails', git: 'https://github.com/jejacks0n/mercury.git'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment