Permalink
Browse files

fix bug when sorting suggestions

  • Loading branch information...
1 parent 9242556 commit ee87b118a3fd0b4236e0ba0d041ec4633b2e7df3 @swanson committed Aug 28, 2011
Showing with 5 additions and 5 deletions.
  1. +2 −2 app/controllers/user_controller.rb
  2. +3 −3 public/javascripts/cloutbout.js
@@ -22,7 +22,7 @@ def get_following
following += response.users
cursor = response.next_cursor
end
- following.sort{|a,b| a.followers_count <=> b.followers_count}.reverse
- render :json => following.first(10)
+ people = following.sort{|a,b| a.followers_count <=> b.followers_count}.reverse
+ render :json => people.first(10)
end
end
@@ -217,7 +217,7 @@ function createPlayerPickerView(defaultPlayer, teamID, slotNum, onSubmit) {
});
}, false);
- callGetMethod("/users/get_following", function(users) {
+ callGetMethod("/user/get_following", function(users) {
rel(loadingEl);
view.appendChild(titleEl);
@@ -307,10 +307,10 @@ function createTeamTabView(viewStack) {
function createUserTile(user, btn, onClick) {
var tileEl = createDivEl("playerTile row");
- var imgEl = createImgEl("playerImg", null, user.image_url);
+ var imgEl = createImgEl("playerImg", null, user.profile_image_url);
tileEl.appendChild(imgEl);
- var nameEl = createDivEl("playerName", null, "@" + user.handle);
+ var nameEl = createDivEl("playerName", null, "@" + user.screen_name);
tileEl.appendChild(nameEl);
if(btn) {

0 comments on commit ee87b11

Please sign in to comment.