On 10 Feb 2009, at 12:14, shahroon ali wrote:
> Hi everyone, > I was just trying to catch some exceptions in my > app, for "Record Not Found" I used this > in my application.rb file > rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found > rescue_from ActionController::NoMethodError, :with => :show_error > > private > > def record_not_found > render :text => "404 Not Found", :status => 404 > end > def show_error(exception) > render :text => exception.message; > end > > > and was quite successful but for "NoMethodError" I am trying the > same but It isn't working at all. Can anybody help me? Because ActionController::NoMethodError doesn't exist. It's just plain NoMethodError (possibly ::NoMethodError but I don't think that's needed here) Fred > > Thanks in advance, > Shahroon > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---