Hello fellas, My logic tests an inventory supply; and the < operator functions fine. How do I assign boolean values to "instock"? (using POST) In this test, under both conditions the value remains unchanged and this sample code does not work.
Also this code is placed in an html.erb file, is there a better place for this code?
<% if @inventory.needed < @inventory.amount then %>
<% @inventory.instock = 'true' %>
<% else %>
<% @inventory.instock = 'false' %>
<% end %>
Thank you in advance for your suggestions!