From 5a1e5da86bbf9d1a61dd387f12f5a4b0c89a64c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Wed, 4 Oct 2017 11:41:37 +0200 Subject: [PATCH 1/2] Fixed poll officers search Returning User objects was provoking conflicts retrieving attributes in the views. --- app/controllers/admin/poll/shifts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/poll/shifts_controller.rb b/app/controllers/admin/poll/shifts_controller.rb index 577e8afad..97bb2f614 100644 --- a/app/controllers/admin/poll/shifts_controller.rb +++ b/app/controllers/admin/poll/shifts_controller.rb @@ -30,7 +30,7 @@ class Admin::Poll::ShiftsController < Admin::Poll::BaseController end def search_officers - @officers = User.search(params[:search]).order(username: :asc) + @officers = User.search(params[:search]).order(username: :asc).select { |o| o.poll_officer? == true } end private From 85695d51bb1f185dd253bd607ac93bed4ea6fd54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Wed, 4 Oct 2017 11:52:09 +0200 Subject: [PATCH 2/2] Changed translations "blank ballots" for "totally blank ballots" --- config/locales/en/admin.yml | 2 +- config/locales/en/officing.yml | 4 ++-- config/locales/es/admin.yml | 2 +- config/locales/es/officing.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index a3751615a..e30d75ea6 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -607,7 +607,7 @@ en: index: title: "Results" no_results: "There are no results" - table_whites: "Blank ballots" + table_whites: "Totally blank ballots" table_nulls: "Invalid ballots" table_total: "Total ballots" table_answer: Answer diff --git a/config/locales/en/officing.yml b/config/locales/en/officing.yml index 2dfc29ac3..378b87b15 100644 --- a/config/locales/en/officing.yml +++ b/config/locales/en/officing.yml @@ -29,7 +29,7 @@ en: date: "Date" select_booth: "Select booth" select_date: "Select date" - ballots_white: "Blank ballots" + ballots_white: "Totally blank ballots" ballots_null: "Invalid ballots" ballots_total: "Total ballots" submit: "Save" @@ -40,7 +40,7 @@ en: results: Results table_answer: Answer table_votes: Votes - table_whites: "Blank ballots" + table_whites: "Totally blank ballots" table_nulls: "Invalid ballots" table_total: "Total ballots" residence: diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index f95c2d39f..695e5e639 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -607,7 +607,7 @@ es: index: title: "Resultados" no_results: "No hay resultados" - table_whites: Papeletas en blanco + table_whites: Papeletas totalmente en blanco table_nulls: Papeletas nulas table_total: Papeletas totales table_answer: Respuesta diff --git a/config/locales/es/officing.yml b/config/locales/es/officing.yml index 74358ab56..354b59710 100644 --- a/config/locales/es/officing.yml +++ b/config/locales/es/officing.yml @@ -29,7 +29,7 @@ es: date: "Día" select_booth: "Elige urna" select_date: "Elige día" - ballots_white: "Papeletas en blanco" + ballots_white: "Papeletas totalmente en blanco" ballots_null: "Papeletas nulas" ballots_total: "Papeletas totales" submit: "Guardar" @@ -40,7 +40,7 @@ es: results: "Resultados" table_answer: Respuesta table_votes: Votos - table_whites: Papeletas en blanco + table_whites: Papeletas totalmente en blanco table_nulls: Papeletas nulas table_total: Papeletas totales residence: