Why isn't my if then statement working in ERB?
All I want if to output "test" if all_day is set to "true"
Here's my code:
<%= event.all_day == "true" ? 'test' : '' %>
If I just have <%= event.all_day %> it does work and it does output either
true or false. So, I'm not sure what I'm doing wrong here.
No comments:
Post a Comment