Skip to content

Instantly share code, notes, and snippets.

@hone

hone/gist:171383

Created Aug 20, 2009
Embed
What would you like to do?
# normal new.html.erb
<<ERB
<p>This is some text</p>
ERB
# outputting a variable name,
# name = "joe"
<<ERB
<p>Hello <%= name %></p>
ERB
# outputting something more complicated
<<ERB
<p><%= "Hello #{name}, did you know 1 + 1 = #{1 + 1}" %></p>
ERB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.