From 7c5fa253f5dba0704bbd1374be5ae14b410ec302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= Date: Thu, 17 Jan 2019 20:11:11 +0100 Subject: [PATCH] Fix queries and scopes after column deletion Some queries were accessing original column instead of the new translatable one. This should have been causing unexpected behavior for requests maded in a different locale than the application default. --- app/controllers/admin/poll/polls_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/admin/poll/polls_controller.rb b/app/controllers/admin/poll/polls_controller.rb index 90cf751a1..a543093b2 100644 --- a/app/controllers/admin/poll/polls_controller.rb +++ b/app/controllers/admin/poll/polls_controller.rb @@ -11,9 +11,7 @@ class Admin::Poll::PollsController < Admin::Poll::BaseController end def show - @poll = Poll.includes(:questions). - order("poll_questions.title"). - find(params[:id]) + @poll = Poll.find(params[:id]) end def new