Frederick C. wrote:
On 31 Mar 2008, at 18:08, John S. wrote:
It continues with the same error. I have created with a scaffold a
class PostsController < ApplicationController
rescue_from Activerecord::NoMethodError. with => :not_found
You’ve got several typos in here. What’s actually in your posts
In addition NoMethodError sounds like a bad thing to be rescuing like
this. What’s the real problem you’re trying to solve?
For example, considerar I have an object named product. This product has
a price. If I destroy that product and go to a ticket index view
(showinng ID, client name and product) I get NoMethodError with
ticket.product.price. Of course, if I don’t destroy that product, I
don’t get that error.