Skip to content

Commit

Permalink
Update README examples
Browse files Browse the repository at this point in the history
  • Loading branch information
drewolson committed Jun 15, 2016
1 parent 16e2d68 commit cd8c5bd
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ end

```elixir
def index(conn, params) do
page = MyApp.Person
|> where([p], p.age > 30)
|> order_by(desc: :age)
|> preload(:friends)
|> MyApp.Repo.paginate(params)
page =
MyApp.Person
|> where([p], p.age > 30)
|> order_by(desc: :age)
|> preload(:friends)
|> MyApp.Repo.paginate(params)

render conn, :index,
people: page.entries,
Expand All @@ -48,11 +49,12 @@ end
```

```elixir
page = MyApp.Person
|> where([p], p.age > 30)
|> order_by(desc: :age)
|> preload(:friends)
|> MyApp.Repo.paginate(page: 2, page_size: 5)
page =
MyApp.Person
|> where([p], p.age > 30)
|> order_by(desc: :age)
|> preload(:friends)
|> MyApp.Repo.paginate(page: 2, page_size: 5)
```

## Installation
Expand Down

0 comments on commit cd8c5bd

Please sign in to comment.