First time deploying on heroku and my app, which is working fine locally on heroku (logs) throws NoMethodError (undefined method `round' for nil:NilClass) for this line of code:
def show
if @movie.reviews.blank?
@average_review = 0
else
@average_review = @movie.reviews.average(:rating).round(2)
end
end
I checked the data with console and it has a movie, review and rating. I'd provide more code but I'm a beginner and have no idea where to check. Appreciate any help, thanks!