Skip to content

Instantly share code, notes, and snippets.

@drew5020
Created November 24, 2011 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drew5020/1391742 to your computer and use it in GitHub Desktop.
Save drew5020/1391742 to your computer and use it in GitHub Desktop.
View Code (HTML Removed for Simplicity)
<% @links.each_with_index do |link, index| %>
<% if index == 0 then %>
<%= link_to (image_tag ("arrow.png")), up_link_url(link), :method => :put %>
<%= @points %>
<%= link_to strip_tags(link.title), link %>
<%= raw link.embed_code%>
<% if session[:user_id] %>
<%= link_to "Favorite", :controller => :favorites, :action => :create %>
<% end%>
<% else %>
<%= link_to (image_tag ("arrow.png")), up_link_url(link), :method => :put %>
<%= @points %>
<%= link_to strip_tags(link.title), link %>
<%= link_to "Favorite", :controller => :favorites, :action => :create %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment