From 606faa2ee5b1feda999982cf8c5bf3a02532b910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 23 Nov 2018 10:37:05 +0100 Subject: [PATCH] FIX: ensure poll options keep their order --- plugins/poll/app/models/poll_option.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/poll/app/models/poll_option.rb b/plugins/poll/app/models/poll_option.rb index f245d61244..96a8d9372b 100644 --- a/plugins/poll/app/models/poll_option.rb +++ b/plugins/poll/app/models/poll_option.rb @@ -2,7 +2,7 @@ class PollOption < ActiveRecord::Base belongs_to :poll has_many :poll_votes, dependent: :delete_all - default_scope { order(created_at: :asc) } + default_scope { order(:id) } end # == Schema Information