Actually mark a trace as being public based on the saved preference, rather than simply ignoring the saved preference.

This commit is contained in:
Shaun McDonald 2009-05-12 15:29:27 +00:00
parent ed0a1658df
commit 807070f818

View file

@ -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