From 14b5be69dc2dc3c4dd817feb0b5a8402fc343db4 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Fri, 3 Feb 2012 13:08:34 +0000 Subject: Make variables local MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The variables last_request_id and last_body_id were not used by the view, so it’s clearer to make them local variables so it’s obvious from the controller code which values influence the rendering. --- app/controllers/help_controller.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/controllers/help_controller.rb') diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 9b00846ee..b08438b52 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -31,15 +31,15 @@ class HelpController < ApplicationController end # look up link to request/body - @last_request_id = cookies["last_request_id"].to_i - if @last_request_id > 0 - @last_request = InfoRequest.find(@last_request_id) + last_request_id = cookies["last_request_id"].to_i + if last_request_id > 0 + @last_request = InfoRequest.find(last_request_id) else @last_request = nil end - @last_body_id = cookies["last_body_id"].to_i - if @last_body_id > 0 - @last_body = PublicBody.find(@last_body_id) + last_body_id = cookies["last_body_id"].to_i + if last_body_id > 0 + @last_body = PublicBody.find(last_body_id) else @last_body = nil end -- cgit v1.2.3