Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More scoping fixes.

  • Loading branch information...
commit 5348ef062733d2c0eb588ed8cdcb54786fd244ed 1 parent aba172b
H. Wade Minter authored February 26, 2013

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  app/controllers/trackers_controller.rb
6  app/controllers/trackers_controller.rb
@@ -17,7 +17,7 @@ def index
17 17
   # GET /trackers/1
18 18
   # GET /trackers/1.json
19 19
   def show
20  
-    @tracker = Tracker.find(params[:id])
  20
+    @tracker = Tracker.where(:user_id => current_user.id).find(params[:id])
21 21
 
22 22
     respond_to do |format|
23 23
       format.html # show.html.erb
@@ -28,7 +28,7 @@ def show
28 28
   # GET /trackers/new
29 29
   # GET /trackers/new.json
30 30
   def new
31  
-    @tracker = Tracker.new(:active => true)
  31
+    @tracker = Tracker.new(:active => true, :user_id => current_user.id)
32 32
 
33 33
     respond_to do |format|
34 34
       format.html # new.html.erb
@@ -78,7 +78,7 @@ def update
78 78
   # DELETE /trackers/1
79 79
   # DELETE /trackers/1.json
80 80
   def destroy
81  
-    @tracker = Tracker.find(params[:id])
  81
+    @tracker = Tracker.where(:user_id => current_user.id).find(params[:id])
82 82
     @tracker.destroy
83 83
 
84 84
     respond_to do |format|

0 notes on commit 5348ef0

Please sign in to comment.
Something went wrong with that request. Please try again.