Skip to content

Instantly share code, notes, and snippets.

@colmtuite
Created June 27, 2012 12:00
Show Gist options
  • Save colmtuite/3003643 to your computer and use it in GitHub Desktop.
Save colmtuite/3003643 to your computer and use it in GitHub Desktop.
<li class="job <%= compact.state %>">
<a href="<%= compact %>">
<div>
<strong>Description</strong>
<span><%= compact.description %></span>
</div>
<div>
<strong>Quantity</strong>
<span><%= compact.quantity %></span>
</div>
<div>
<strong>Quantity</strong>
<span><%= compact.created_at.utc.strftime("%d %b %Y") %></span>
</div>
<div>
<strong>Quantity</strong>
<span><%= number_to_currency(compact.quoted_price, unit: '€') %></span>
</div>
</a>
</li>
@dtuite
Copy link

dtuite commented Jun 27, 2012

You can do

 <a href="<%= job_path(compact) %> ">
    <!-- loads of stuff -->
</a>

Or if you want to take advantage of the Rails link_to helper

<%= link_to job_path(compact) do %>
    <!-- loads of stuff -->
<% end %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment