From 0b525ca3d9f971262d5d341692695c65b5646ae5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 20 Sep 2013 13:40:58 +0200 Subject: [PATCH] Improved error handling. --- app/models/application_model.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/application_model.rb b/app/models/application_model.rb index 663e6ba58..ef8509653 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -39,6 +39,10 @@ returns def self.param_cleanup(params) + if params == nil + raise "No params for #{self.to_s}!" + end + # only use object attributes data = {} self.new.attributes.each {|item|