Skip to content

Instantly share code, notes, and snippets.

@alkema
Created June 2, 2015 23:41

Revisions

  1. alkema created this gist Jun 2, 2015.
    17 changes: 17 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    - cache [@current_market, MarketPod.get_in_shape.name, get_in_shape_pods.max_by(&:updated_at)] do
    .module-header
    %h3
    Get in Shape
    %a.button.button-see-all-white{href: products_path}
    See All
    %ul.clearfix
    - if get_in_shape_pods.present?
    - pod = get_in_shape_pods[0]
    - cache [MarketPod.get_in_shape.name, "small-pod", pod] do
    %li.collection-item.gear.small-collection-item
    = render pod.poddable.decorated_for(:homepage)
    - if get_in_shape_pods.length > 1
    - pod = get_in_shape_pods[1]
    - cache [MarketPod.get_in_shape.name, "big-pod", pod] do
    %li.collection-item.gear.big-collection-item
    = render pod.poddable.decorated_for(:homepage, :big)