View Source Dropkick.Context (dropkick v0.0.1)
Link to this section Summary
Functions
Deletes a changeset with its associated files.
This function relies on Ecto.Multi to persist the attached information in the same transaction
and it accepts the same options as Ecto.Repo.update/2.
Inserts a changeset with its associated files.
This function relies on Ecto.Multi to persist the attached information in the same transaction
and it accepts the same options as Ecto.Repo.insert/2.
Updates a changeset with its associated files.
This function relies on Ecto.Multi to persist the attached information in the same transaction
and it accepts the same options as Ecto.Repo.update/2.
Link to this section Functions
Deletes a changeset with its associated files.
This function relies on Ecto.Multi to persist the attached information in the same transaction
and it accepts the same options as Ecto.Repo.update/2.
examples
Examples
def delete_user(user, attrs) do
user
|> User.changeset(attrs)
|> update_with_files(MyApp.Uploader)
end
Inserts a changeset with its associated files.
This function relies on Ecto.Multi to persist the attached information in the same transaction
and it accepts the same options as Ecto.Repo.insert/2.
examples
Examples
def create_user(user, attrs) do
user
|> User.changeset(attrs)
|> insert_with_files(MyApp.Uploader)
end
Updates a changeset with its associated files.
This function relies on Ecto.Multi to persist the attached information in the same transaction
and it accepts the same options as Ecto.Repo.update/2.
examples
Examples
def update_user(user, attrs) do
user
|> User.changeset(attrs)
|> update_with_files(MyApp.Uploader)
end