I have an array ‘sub_status_arr’ which contains a set of values.
If all elements in that array are 52, a button is displayed, else something else is displayed.
I tried the following but it does not seem to work properly. It is only checking if the array contains 51 and ignoring the rest
<%if sub_status_arr.include? 51 || 53 || 54 %>
display button
<% else %>
do something else
<% end %>
How do I check if all elements in the array are 52?
Thanks for your suggestions
I would try the
all?function: