Skip to content

Instantly share code, notes, and snippets.

@leenasn
Last active December 17, 2015 12:49
Show Gist options
  • Select an option

  • Save leenasn/5612609 to your computer and use it in GitHub Desktop.

Select an option

Save leenasn/5612609 to your computer and use it in GitHub Desktop.

Revisions

  1. leenasn renamed this gist May 20, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. leenasn created this gist May 20, 2013.
    5 changes: 5 additions & 0 deletions list2.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    [<% @users.each_with_index do |user, index| %>{
    "id" : "<%= user.id %>" ,
    "name" : "<%= user.full_name.split.first %>",
    "profile_image_url" : "<%= user.profile_image_thumbnail.remote_url %>"
    }<%= ((index + 1) == @users.count)? "" : "," %><% end %>]