I have action like this to add one ContestEntry record to showcase.
@entry = ContestEntry.find(params[:content_id])
if @entry.view_in_showcase == true
@entry.view_in_showcase = false
@entry.save
redirect_to :back, :notice => "Drop design to showcase"
else
@entry.view_in_showcase = true
@entry.save
redirect_to :back, :notice => "Add design to showcase"
end
But now I have to implement it for multiple records and I have array that includes ContestEntry records.How can I use this array with these code ?
for instance :
arr_showcase = [ContestEntry.first,ContestEntry.last,..]
How can update this array with same purpose above the text.