Skip to content

Commit

Permalink
[#96] Minor naming updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zberkom committed Oct 24, 2018
1 parent 15a2dd9 commit c0ee31a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ You will want to update it to include your new navigation link:

### Association filters

Torch does not support association filters at this time. The reason for this
is the filtering library [Filtrex](https://github.com/rcdilorenzo/filtrex) we're using does not yet support them.
Torch does not support association filters at this time. [Filtrex](https://github.com/rcdilorenzo/filtrex) does not yet support them.

You can checkout these two issues to see the latest updates:

Expand All @@ -130,14 +129,14 @@ defp do_paginate_users(filter, params) do

User
|> Filtrex.query(filter)
|> custom_filters(credential_params)
|> credential_filters(credential_params)
|> order_by(^sort(params))
|> paginate(Repo, params, @pagination)
end

defp custom_filters(query, nil), do: query
defp credential_filters(query, nil), do: query

defp custom_filters(query, params) do
defp credential_filters(query, params) do
search_string = "%#{params["email"]}%"

from(u in query,
Expand All @@ -152,7 +151,7 @@ end
2. Update form filters.

```eex
# users/index.html
# users/index.html.eex
<div class="field">
<label>Credential email</label>
<%= text_input(:credentials, :email, value: maybe(@conn.params, ["credentials", "email"])) %>
Expand Down

0 comments on commit c0ee31a

Please sign in to comment.