Q:

How get several elemt by id title from ecto?

I can get elements from ecto by them id via method's Repo.get!(Post, id). But I don't cat get elements by them title via method's Repo.get_by!(Post, title: "title") if I have similiar elements with this title. Please, help me get all elements from repo by them title.

A:

Post
|> where(title: ^title)
|> Repo.all

