Topic: Nil Error when no review is present
I'm working on an application that has the models:
Album has_one :review
Review belongs_to :album
In my views i would have something like this:
That works if a review is in the database, but If no review body is in the database, I get an error along with an unrendered page.
Is there a way to prevent rails from doing this?