Skip to content

Instantly share code, notes, and snippets.

@ngarneau
Created November 11, 2011 03:53
Show Gist options
  • Select an option

  • Save ngarneau/1357142 to your computer and use it in GitHub Desktop.

Select an option

Save ngarneau/1357142 to your computer and use it in GitHub Desktop.

Revisions

  1. Nicolas renamed this gist Nov 11, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Nicolas created this gist Nov 11, 2011.
    12 changes: 12 additions & 0 deletions hash-loop
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    - @objects.each do |item|
    .feed-item.left.relative
    .feed-image.left
    - if item['pictures'].empty? == false
    - item['pictures'].each do |pics|
    - if pics['main'] == true
    %img{:src => "#{pics['filename']}-small.png"}
    - else
    %img{:src => "default-small.png"}
    .feed-spec.left
    %h3
    %a{:href => "/profile/#{item['uid']}"}= item['user']['username']