lib/active_enhancements.rb
def revert
      delete_all
      connection.execute("ALTER TABLE #{table_name} AUTO_INCREMENT = 1")
      return true
    rescue 
       return false
    end
# resets the database table (includes an id reset)
resets the database table (includes an id reset)
resets the database table ( includes an id reset )
def revert
      delete_all
      connection.execute("ALTER TABLE #{table_name} AUTO_INCREMENT = 1")
      return true
    rescue 
       return false
    end
def revert delete_all connection . execute ( "ALTER TABLE #{table_name} AUTO_INCREMENT = 1" ) return true rescue return false end
resets the database table (includes an id reset)
resets the database table ( includes an id reset )