lmarburger (owner)

Fork Of

Revisions

gist: 223574 Download_button fork
public
Public Clone URL: git://gist.github.com/223574.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#friends = Array.new
#current_user.connections.each do |c|
  #friends.push([c.friend.full_name, c.user_id])
 
friends = current_user.connections.map do |c|
  [ c.friend.full_name, c.user_id ]
end
 
friends = friends.sort do |a, b|
  a[0] <=> b[0]
end
 
# friends = current_user.connections.map { |c| c.friend.full_name }.sort { |a,b| a.downcase <=> b.downcase }
f.select :receiver_id, friends