Skip to content

Commit

Permalink
Fix typo for paginator.call in the README
Browse files Browse the repository at this point in the history
Paginator#call accepts base_url:, not base_ur
  • Loading branch information
Sebastian Wilgosz committed Sep 9, 2020
1 parent 9faab9e commit 58d8ce4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Or install it yourself as:
```ruby
paginator = JSOM::Pagination::Paginator.new
collection = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
paginated = paginator.call(collection, params: { number: 2, size: 3 }, base_ur: 'https://example.com')
paginated = paginator.call(collection, params: { number: 2, size: 3 }, base_url: 'https://example.com')
```

**For ActiveRecord collections**

```ruby
paginator = JSOM::Pagination::Paginator.new
collection = Article.published
paginated = paginator.call(collection, params: { number: 2, size: 3 }, base_ur: 'https://example.com')
paginated = paginator.call(collection, params: { number: 2, size: 3 }, base_url: 'https://example.com')
```

**Meta data object**
Expand Down Expand Up @@ -66,7 +66,6 @@ paginated.links.to_h
# }
```


### Rendering using fast_jsonapi

```
Expand Down

0 comments on commit 58d8ce4

Please sign in to comment.