aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-03-22 15:02:30 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-03-22 15:02:30 +1100
commitca4ae410e70ab490ae4c8cad8839f41783c89ef7 (patch)
treed97be8750f49db30865e4948b1a0e29e9486e206 /app/models/info_request.rb
parent661ad52ef88de7afcbd7820d8283057764f4d1ac (diff)
Extract method
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 156399b99..83a57b4b2 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -555,6 +555,13 @@ public
['requires_admin', 'error_message', 'attention_requested'].include?(described_state)
end
+ # Report this request for administrator attention
+ def report!(reason, message, user)
+ set_described_state('attention_requested', user, "Reason: #{reason}\n\n#{message}")
+ self.attention_requested = true # tells us if attention has ever been requested
+ save!
+ end
+
# change status, including for last event for later historical purposes
def set_described_state(new_state, set_by = nil, message = "")
old_described_state = described_state