07-19-2023, 01:32 AM
I want to perform an if condition where, if `linkedpub.LPU_ID` is found in an array of values(`@associated_linked_pub`), do some action.
I tried the following but the syntax is not correct.
Any suggestion is most welcomed..Thanks a lot
<% for linkedpub in Linkedpub.find(:all) %>
<% if linkedpub.LPU_ID IN @associated_linked_pub %>
# do action
<%end%>
<%end%>
I tried the following but the syntax is not correct.
Any suggestion is most welcomed..Thanks a lot
<% for linkedpub in Linkedpub.find(:all) %>
<% if linkedpub.LPU_ID IN @associated_linked_pub %>
# do action
<%end%>
<%end%>