lundi 25 avril 2016

how can i display other listings posted by the same user? [on hold]

my controller for showing action

def show
  if @listing.reviews.blank?
     @average_review = 0
  else
     @average_review = @listing.reviews.average(:rating).round(2)
  end
  @listings = Listing.find(params[:id])
  impressionist(@listings)
end

Aucun commentaire:

Enregistrer un commentaire