Ruby / Rails - example of if then statement... in a view file *.html.erb:


/ Published in: Ruby
Save to your folder(s)

if then statement... in a view file *.html.erb:


Copy this code and paste it in your HTML
  1. <td><% if color.current == "1" %>Yes<% end %></td>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.