I want to check if a value is true or false.
<% if item.active? %>
<%= image_tag('on.png', :alt => "Active", :border => 0) %>
<% else %>
<%= image_tag('off.png', :alt => "Inactive", :border => 0) %>
<% end %>
That doesn't work, but this works?
<% if item.active == true %>
<%= image_tag('on.png', :alt => "Active", :border => 0) %>
<% else %>
<%= image_tag('off.png', :alt => "Inactive", :border => 0) %>
<% end %>
Shouldn't the first method work or am I missing something?