mirror of
https://github.com/ClaperCo/Claper.git
synced 2025-12-16 11:57:58 +01:00
Set PollOpt preload order (#187)
This commit is contained in:
@@ -27,7 +27,11 @@ defmodule Claper.Polls.Poll do
|
|||||||
field :show_results, :boolean
|
field :show_results, :boolean
|
||||||
|
|
||||||
belongs_to :presentation_file, Claper.Presentations.PresentationFile
|
belongs_to :presentation_file, Claper.Presentations.PresentationFile
|
||||||
has_many :poll_opts, Claper.Polls.PollOpt, on_replace: :delete
|
|
||||||
|
has_many :poll_opts, Claper.Polls.PollOpt,
|
||||||
|
preload_order: [asc: :id],
|
||||||
|
on_replace: :delete
|
||||||
|
|
||||||
has_many :poll_votes, Claper.Polls.PollVote, on_replace: :delete
|
has_many :poll_votes, Claper.Polls.PollVote, on_replace: :delete
|
||||||
|
|
||||||
timestamps()
|
timestamps()
|
||||||
|
|||||||
Reference in New Issue
Block a user