Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Mohamed Magdy's Profile

GitHub User: mohamagdy

Site: http://lienzo.biz

Comments by Mohamed Magdy

Avatar

If you need it simple then acts_as_votable will be a solution for you. activerecord-reputation-system has some advanced options.

Avatar

Aha, I see, thanks for sharing. May be acts_as_votable replaces the doing from scratch approach.

Avatar

I don't know what makes this gem different from the existing acts_as_votable gem https://github.com/ryanto/acts_as_votable?

Avatar

If anyone still having a problem with saving the changes then add the following lines in your mercury.js file. Thanks to @seventhsense

ruby
  onload: function() {
    //Mercury.PageEditor.prototype.iframeSrc = function(url) { return '/testing'; }
    Mercury.on('ready', function() {
      var link = $('#mercury_iframe').contents().find('#edit_link');
      Mercury.saveUrl = link.data('save-url');
      link.hide();
    });

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