I have the following code:
advertisements_arel = Advertisement.order("advertisements.id
@advertisements = (params[:website_id].present? ?
advertisements_arel.where(:website_id => params[:website_id]) :
It returns a struct Arel::SelectManager::Row data
But I’d like it to return an array of Advertisement objects (like it
would normally do) so I can iterate over it more easily. This is because
kaminari is intergrated into the model Advertisement.
Anyone know how to do that?