def create_revision
      return unless self.revision_data
      
      # creating revision
      if ComfyPress.config.revisions_limit.to_i != 0
        self.revisions.create!(:data => self.revision_data)
      end
      
      # blowing away old revisions
      ids = [0] + self.revisions.limit(ComfyPress.config.revisions_limit.to_i).collect(&:id)
      self.revisions.where('id NOT IN (?)', ids).destroy_all
    end
def create_revision
      return unless self.revision_data
      
      # creating revision
      if ComfyPress.config.revisions_limit.to_i != 0
        self.revisions.create!(:data => self.revision_data)
      end
      
      # blowing away old revisions
      ids = [0] + self.revisions.limit(ComfyPress.config.revisions_limit.to_i).collect(&:id)
      self.revisions.where('id NOT IN (?)', ids).destroy_all
    end
Revision is created only if relevant data changed