projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9861ca8
)
Include the home location in API user details response.
author
Tom Hughes
<tom@compton.nu>
Sun, 19 Aug 2007 09:43:01 +0000
(09:43 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sun, 19 Aug 2007 09:43:01 +0000
(09:43 +0000)
app/models/user.rb
patch
|
blob
|
history
diff --git
a/app/models/user.rb
b/app/models/user.rb
index 908ef3d517b6016287e7793661cc404462acb608..ef8e8bbf70aca4a2215a6cf7758fac913d7b2e54 100644
(file)
--- a/
app/models/user.rb
+++ b/
app/models/user.rb
@@
-58,6
+58,13
@@
class User < ActiveRecord::Base
el1 = XML::Node.new 'user'
el1['display_name'] = self.display_name.to_s
el1['account_created'] = self.creation_time.xmlschema
+ if self.home_lat and self.home_lon
+ home = XML::Node.new 'home'
+ home['lat'] = self.home_lat.to_s
+ home['lon'] = self.home_lon.to_s
+ home['zoom'] = self.home_zoom.to_s
+ el1 << home
+ end
return el1
end