I have an array called @venues with all the restaurants within a radius. Each venue has_manydishes and I want to insert an array of these dishes into venue.
@venues = Venue.within(radius, :origin => [lat, lng]).order('distance ASC')
@venues.each do |venue|
dishes = venue.dishes.where("? BETWEEN DATE(served_from) AND DATE(served_until)", Date.today)
# insert dishes into venue
end
How do I insert dishes into venue so that I can access all the available dishes of an venue with: @venues[i].dishes?