Skip to content

Instantly share code, notes, and snippets.

@zaneclaes
Created December 5, 2013 04:50
Show Gist options
  • Save zaneclaes/7800317 to your computer and use it in GitHub Desktop.
Save zaneclaes/7800317 to your computer and use it in GitHub Desktop.
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
Copy link

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