Ask A Question
You’re not receiving notifications from this thread.
How do I display related or similar Ads by currency on the Ad show page?
Hi Chris I need your help on this please. I'm trying to display related Ads on the Ad show page by currency. But somehow my script displays the same Ad in multiples of related Ads and not showing the actual related Ads.
def show @related_ads = Ad.where.not(currency_id: @ad.currency_id)
<% @related_ads.each do |ad| %> <%= @ad.name %> <% end %>