def get_closest_revision(revisions, current, status)
      if status == 'user-autosave'
        revisions.each_with_index do |f, index|
            return f if f.post_status.downcase == 'user-autosave' && index > current 
        end
        return nil
      end

      return revisions[current+1] if !revisions[current+1].blank?
      return revisions[0].parent
    end
def get_closest_revision(revisions, current, status)
      if status == 'user-autosave'
        revisions.each_with_index do |f, index|
            return f if f.post_status.downcase == 'user-autosave' && index > current 
        end
        return nil
      end

      return revisions[current+1] if !revisions[current+1].blank?
      return revisions[0].parent
    end
returns the closest revision to the current revision been displayed - this is an internal functon that no-body should have to worry about or touch
 Params:
 +revisions+:: ActiveRecord hash of revisions
 +current+:: integer of the current record
 +status+:: what status of the revisions you want to check against