Created
December 5, 2013 04:50
-
-
Save zaneclaes/7800317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connections_objects = connections.each {|sc| sc.populate(:context => SocialConnection::CONTEXT_USER)}; | |
connections_json = connections_objects.map{|sc| sc.as_json }; | |
connections_json = connections_json.each{|sc| sc['test'] = 'one' }; | |
render :json => {:connections_count => connections.count, :connections => connections_json} |
jimmytang
commented
Dec 5, 2013
connections_json = connections.map do |sc|
sc.populate(:context => SocialConnection::CONTEXT_USER)
sc_json = sc.as_json
sc_json['test'] = 'one'
return sc_json
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment