Bonfire.Poll.Choices (Bonfire v1.0.1-social-alpha.28)

View Source

Summary

Functions

Removes the association between a choice and a question. Deletes the Ranked record linking the choice to the question. Returns :ok if deleted, {:error, reason} otherwise.

Functions

find_choice_by_name(question, name)

put_choice(choice, question, position \\ nil)

remove_choice(choice_id, question_id)

Removes the association between a choice and a question. Deletes the Ranked record linking the choice to the question. Returns :ok if deleted, {:error, reason} otherwise.

simple_create_and_put(index \\ nil, choices_or_choice_attrs, question_id, opts)