From 807070f818ca0253a9a9a4f94e6ef1554ba308e8 Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Tue, 12 May 2009 15:29:27 +0000 Subject: [PATCH] Actually mark a trace as being public based on the saved preference, rather than simply ignoring the saved preference. --- app/controllers/trace_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index e6c732d2d..47bc62be8 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -92,6 +92,13 @@ class TraceController < ApplicationController end def mine + # Load the preference of whether the user set the trace public the last time + @trace = Trace.new + if @user.preferences.find(:first, :conditions => {:k => "gps.trace.public", :v => "default"}).nil? + @trace.public = false + else + @trace.public = true + end list(@user, "mine") end -- 2.43.2