Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html.erb conditionally add class

<div class="<%= @error ? 'error-class' : 'normal-class' %>">
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #conditionally #add #class
ADD COMMENT
Topic
Name
1+5 =