Casecommons / pg_search

pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
http://www.casebook.net
MIT License
1.34k stars 371 forks source link

Change delete_all to delete_by in README.md #454

Closed citizen428 closed 3 years ago

citizen428 commented 3 years ago

While setting up multisearch I noticed what I believe to be a little error in the documentation:

PgSearch::Document.delete_all(searchable_type: "TheModel")
# ArgumentError: wrong number of arguments (given 1, expected 0)

PgSearch::Document.delete_by(searchable_type: "TheModel")
# PgSearch::Document Destroy (1.1ms)  DELETE FROM "pg_search_documents" WHERE "pg_search_documents"."searchable_type" = $1 ...
nertzy commented 3 years ago

Thanks!