From 330046dee98a9cb5ee84dd9512b247a685ac6914 Mon Sep 17 00:00:00 2001 From: lizconlan Date: Wed, 25 Jun 2014 14:44:02 +0100 Subject: Refactor state update API, better error handling Filters; more 403s, fewer 500s; added logging; less duplication --- app/models/info_request.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/models/info_request.rb') diff --git a/app/models/info_request.rb b/app/models/info_request.rb index a2112a210..aed651ad3 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -115,6 +115,16 @@ class InfoRequest < ActiveRecord::Base states end + # Subset of states accepted via the API + def self.allowed_incoming_states + [ + 'waiting_response', + 'rejected', + 'successful', + 'partially_successful' + ] + end + # Possible reasons that a request could be reported for administrator attention def report_reasons [_("Contains defamatory material"), -- cgit v1.2.3