Skip to content

Instantly share code, notes, and snippets.

@ueno1969
Created December 24, 2013 05:46
Show Gist options
  • Save ueno1969/8109254 to your computer and use it in GitHub Desktop.
Save ueno1969/8109254 to your computer and use it in GitHub Desktop.
p
= link_to("test link", '/?x=1&y=2')
p
== link_to("test link2", '/?x=1&y=2')
p
= link_to("test link3", :href => '/?x=1&y=2')
p
= link_to("test link4", '/?x=1&y=2'.html_safe)
<p>
<%= link_to("test link", '/?x=1&y=2') %>
</p>
<p>
<%== link_to("test link2", '/?x=1&y=2') %>
</p>
<p>
<%= link_to("test link3", :href => '/?x=1&y=2') %>
</p>
<p>
<%= link_to("test link4", '/?x=1&y=2'.html_safe) %>
</p>
@ueno1969
Copy link
Author

Get Source(with indent)

<p>
  <a href="/?x=1&amp;amp;y=2">test link</a>
</p>
<p>
  <a href="/?x=1&amp;amp;y=2">test link2</a>
</p>
<p>
  <a href="/?x=1&amp;y=2">test link3</a>
</p>
<p>
  <a href="/?x=1&amp;y=2">test link4</a>
</p>

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