Update README.md

This commit is contained in:
Radek Molenda 2021-10-19 23:35:38 +02:00 committed by GitHub
parent 4caf7c25b0
commit cfdd10f408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -63,9 +63,6 @@ this example, with preloading each Person's Articles and pagination):
def index
@q = Person.ransack(params[:q])
@people = @q.result.includes(:articles).page(params[:page])
# or use `to_a.uniq` to remove duplicates (can also be done in the view):
@people = @q.result.includes(:articles).page(params[:page]).to_a.uniq
end
```