diff --git a/plugins/poll/app/models/poll.rb b/plugins/poll/app/models/poll.rb index fd5422a620b..3c21f880cc3 100644 --- a/plugins/poll/app/models/poll.rb +++ b/plugins/poll/app/models/poll.rb @@ -4,7 +4,7 @@ class Poll < ActiveRecord::Base belongs_to :post - has_many :poll_options, dependent: :destroy + has_many :poll_options, -> { order(:id) }, dependent: :destroy has_many :poll_votes enum type: { diff --git a/plugins/poll/app/models/poll_option.rb b/plugins/poll/app/models/poll_option.rb index 96a8d9372b1..027c97710ba 100644 --- a/plugins/poll/app/models/poll_option.rb +++ b/plugins/poll/app/models/poll_option.rb @@ -1,8 +1,6 @@ class PollOption < ActiveRecord::Base belongs_to :poll has_many :poll_votes, dependent: :delete_all - - default_scope { order(:id) } end # == Schema Information