Skip to content

Instantly share code, notes, and snippets.

@tihuan
Last active August 29, 2015 14:01
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 tihuan/31c8ff6abaedd1b7e831 to your computer and use it in GitHub Desktop.
Save tihuan/31c8ff6abaedd1b7e831 to your computer and use it in GitHub Desktop.
Rails - Using Partials
<div class="part">
>>>I'm a partial<<<
</div>
<ol>
<div class="url">
<li><%= link_to url.short_url, "http://#{url.url}" %> - <%="#{url.url}"%></li>
</div>
</ol>
<div class="part">
>>>I'm a partial<<<
</div>
<%= render "part" %>
<ol>
<%= render @urls %>
</ol>
<%= render "part" %>
<%= link_to "Shorten URL", new_url_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment