Skip to content

Instantly share code, notes, and snippets.

@amutz
Last active August 29, 2015 14:21
Show Gist options
  • Save amutz/f64e453e7825cb55a042 to your computer and use it in GitHub Desktop.
Save amutz/f64e453e7825cb55a042 to your computer and use it in GitHub Desktop.
Phoenix bug or misunderstanding?
<div>This never gets output.</div>
<% if @value > 2 do %>
<%= "This will get output." %>
<% end %>
@2kodes
Copy link

2kodes commented May 21, 2015

hi . i believe for tags that are supposed to output a value, you should add an equals sign. ie
<%= if @value > 2 do %> instead of <% if @value > 2 do %>
If it doesnt work you can further add an equals sign to the <% end %> too. ie <%= end %>

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