+ def preferences
+ if request.get?
+ render_text @user.preferences
+ elsif request.post? or request.put?
+ @user.preferences = request.raw_post
+ @user.save!
+ render :nothing => true
+ else
+ render :status => 400, :nothing => true
+ end
+ end
+
+ def api_details
+ render :text => @user.to_xml.to_s
+ end
+
+ def api_gpx_files
+ doc = OSM::API.new.get_xml_doc
+ @user.traces.each do |trace|
+ doc.root << trace.to_xml_node() if trace.public? or trace.user == @user
+ end
+ render :text => doc.to_s
+ end