diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-12-23 15:55:57 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-04-27 16:50:31 +0100 |
commit | 5b99495ef39feda47da098f896a801beafc892c5 (patch) | |
tree | d81f2986cb67c2f364487fea967444bfd9e6a1a8 /app/controllers/track_controller.rb | |
parent | 681c5f0c42f5e48a0cdc1e2437675f067f0c299e (diff) |
Add some specs for the vote tracking action.
Diffstat (limited to 'app/controllers/track_controller.rb')
-rw-r--r-- | app/controllers/track_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index 708dd8737..afe10be91 100644 --- a/app/controllers/track_controller.rb +++ b/app/controllers/track_controller.rb @@ -216,12 +216,12 @@ class TrackController < ApplicationController # Track interest in a request from a non-logged in user def widget_vote - info_request = InfoRequest.find(params[:info_request_id]) + @info_request = InfoRequest.find(params[:info_request_id]) if not @user and cookies[:widget_vote] - wv = info_request.widget_votes.where(:cookie => cookies[:widget_vote]).first_or_create + wv = @info_request.widget_votes.where(:cookie => cookies[:widget_vote]).first_or_create end - track_thing = TrackThing.create_track_for_request(info_request) + track_thing = TrackThing.create_track_for_request(@info_request) redirect_to do_track_path(track_thing), status => :temporary_redirect end end |