I have a @slots map and @bookings map from database. What i want is when there is a booking for slot change to apperance. I need to compare hour keys.
I tried that
<%= for slot <- @slots do %>
<%= if Enum.any?(@bookings, fn(x) -> x.hour == slot.hour end) do %>
But all slots are looking booked.
I also tried that . But still all of slots looking booked. This was working when my app was ruby
<% current_booking = Enum.filter(@bookings, fn(x) -> x.hour == slot.hour end)%>
<%= if current_booking do %>