# File app/models/smerf_answer.rb, line 62 def validate # Decode the raw data decode_data() # Validate all fields present errors = validate_object_fields() # Process subquestion for this answer @subquestion_objects = nil if (!@subquestions.nil? and !@subquestions.empty?) # Process and validate subquestions @subquestion_objects = Array.new errors += validate_sub_objects(SmerfQuestion, @subquestions, "sort_order", @subquestion_objects) end # Clear data no longer required, this will reduce the amount of data # saved to the DB cleanup() return errors end