aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/help_controller.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-02-03 13:08:34 +0000
committerRobin Houston <robin.houston@gmail.com>2012-02-03 13:08:34 +0000
commit14b5be69dc2dc3c4dd817feb0b5a8402fc343db4 (patch)
tree2f43c9c02205fec1fb68cdcb66735d5b1ee3172f /app/controllers/help_controller.rb
parentdd9575ca3e75b9460acb23245855c5b50fc0ee3a (diff)
Make variables local
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.
Diffstat (limited to 'app/controllers/help_controller.rb')
-rw-r--r--app/controllers/help_controller.rb12
1 files changed, 6 insertions, 6 deletions
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