Looking for suggestions on following two queries.
Are the two following lines of code different in Ruby / Rails ( in a
<% if @forms.count != 0 %>
<% if @forms.count %>
@forms is an array of objects. Coming from “C” language development
background, i thought they should be the same. FYI, second code
doesn’t give any error but still gets evaluated to TRUE. I confirmed
by doing puts @forms.count in controller
which one is preferred
@forms. count or @forms.size
@forms is an array.