Skip to content

Commit

Permalink
Merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Byron committed Jun 4, 2011
2 parents 17367c8 + c3ac98b commit fb24172
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/public_controller.rb
Expand Up @@ -50,7 +50,7 @@ def announcement
end

def map

@locations = User.alumni.locations
end

private
Expand Down
5 changes: 2 additions & 3 deletions app/models/user.rb
Expand Up @@ -94,9 +94,8 @@ def self.random_password
# Retrieves locations for all users as an array of arrays where the inner
# array is in the form [latitude, longitude].
def self.locations
self.select("latitude, longitude")
.where("latitude IS NOT NULL AND longitude IS NOT NULL")
.map { |u| [u.latitude, u.longitude] }
where("latitude IS NOT NULL AND longitude IS NOT NULL").
map { |u| [u.latitude, u.longitude] }
end

def access_level
Expand Down
2 changes: 1 addition & 1 deletion app/views/public/map.html.haml
Expand Up @@ -3,7 +3,7 @@

:javascript
$(function(){
UW.Maps.init(#{User.locations.to_json});
UW.Maps.init(#{@locations.to_json});
});

#map_canvas

0 comments on commit fb24172

Please sign in to comment.