Skip to content

Instantly share code, notes, and snippets.

@dlikhten
Forked from workmad3/original.html.erb
Created May 22, 2010 21:07
Show Gist options
  • Save dlikhten/410364 to your computer and use it in GitHub Desktop.
Save dlikhten/410364 to your computer and use it in GitHub Desktop.
<ul class="profile_info<%= yield :suffix %>">
<li><%= link_to(fb_name(owner, :use_you => false, :linked => false), owner) %></li>
<% if local_assigns.include?(:phone) %>
<li class="phone"><%= phone %></li>
<%end%>
<% if local_assigns.include?(:location) %>
<li><%= location %></li>
<%end%>
</ul>
content_for :suffix do
mode = 0
mode += 1 if local_assigns.include?(:phone)
mode += 1 if local_assigns.include?(:location)
[ '', '_dual', '_triple' ][ mode ]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment