From f26fef43405d777e0d5f868818998875723c3868 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 19 May 2015 09:32:27 +1000 Subject: [PATCH] silence ar not found --- app/serializers/post_serializer.rb | 2 +- config/initializers/logster.rb | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/serializers/post_serializer.rb b/app/serializers/post_serializer.rb index c8262adab..bbe033936 100644 --- a/app/serializers/post_serializer.rb +++ b/app/serializers/post_serializer.rb @@ -294,7 +294,7 @@ class PostSerializer < BasicPostSerializer def post_custom_fields @post_custom_fields ||= if @topic_view - @topic_view.post_custom_fields && @topic_view.post_custom_fields[object.id] + (@topic_view.post_custom_fields && @topic_view.post_custom_fields[object.id]) || {} else object.custom_fields end diff --git a/config/initializers/logster.rb b/config/initializers/logster.rb index 013e1b3c3..786b4bf98 100644 --- a/config/initializers/logster.rb +++ b/config/initializers/logster.rb @@ -22,7 +22,10 @@ if Rails.env.production? # CSRF errors are not providing enough data # suppress unconditionally for now - /^Can't verify CSRF token authenticity$/ + /^Can't verify CSRF token authenticity$/, + + # 404s can be dealt with elsewise + /^ActiveRecord::RecordNotFound / ] end