My application’s pagination has a small problem …
When I put the vagas: active_search, the pagination stops running …
In my page there is a search field … active_search
can you help me?
Controller
def index(conn, params, user) do
page = Vaga
|> Repo.paginate(params)
active_search = Registro.list_search(params)
render(conn, "index.html", user: user, vagas: page.entries, page: page, vagas: active_search)
# render(conn, "index.html", user: user, vagas: page.entries, page: page) <<<<<<<< Paging works this way
end
You seem to have passed in the :vagas option twice. Once for page.entries and once for active_search. Did you mean to call one of them differently, or maybe remove one of them?
Would need to know how page.entries and active_search actually look like to be more specific. What exactly you are trying to accomplish, why are you both querying both for pages and performing a search?
Hi gilbertosj!
Mind sharing the final code? Trying to solve the exact same problem but I’m finding it difficult to follow the conversation in this thread.
@page doesn’t appear to include the query parameters.
This would be fine if the application was just an API, but I’m wondering if you got this work with scrivener_html paging links.