small medium large xlarge

19 Aug 2010, 11:53
Jimmy B (1 post)


On pg 120/121 we add the method ‘ensure_not_referenced_by_any_line_item’, which executes the following code if a product belongs to a line item:

@errors[:base] « “Line Items present”@

If I fire up the console and check a product using @product.errors@, I can see that the error has been added. But, from what I can see, the error is never displayed to the user.

So my question is: How would I go about displaying this error? I played around with putting some code in the product index, but I can’t actually get the error to display.

Any help would be greatly appreciated

You must be logged in to comment