fixes specs

This commit is contained in:
rgarcia
2017-02-15 15:28:24 +01:00
committed by Javi Martín
parent b4499321d3
commit 74706027cb
5 changed files with 13 additions and 9 deletions

View File

@@ -26,9 +26,13 @@ class Officing::BaseController < ApplicationController
end
def verify_booth
if session[:booth_id].blank?
if current_booth.blank?
redirect_to new_officing_booth_path
end
end
def current_booth
Poll::Booth.where(id: session[:booth_id]).first
end
end

View File

@@ -38,8 +38,4 @@ class Officing::VotersController < Officing::BaseController
.first
end
def current_booth
Poll::Booth.find(session[:booth_id])
end
end