Skip to content

Instantly share code, notes, and snippets.

@pelargir
Created June 24, 2010 02:42
Show Gist options
  • Save pelargir/450904 to your computer and use it in GitHub Desktop.
Save pelargir/450904 to your computer and use it in GitHub Desktop.
<% if @user.role == "ADMIN" -%>
<span class="admin">Welcome Admin</span>
<% elsif @user.role == "USER" -%>
<span class="user">Welcome User</span>
<% else -%>
<span class="peon">Welcome Peon</span>
<% end -%>
<span class="<%= @user.role.downcase %>">
Welcome <%= @user.role.humanize %>
</span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment