aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-08-24 13:02:40 +0200
committerDavid Cabo <david@calibea.com>2011-08-24 13:02:40 +0200
commitca6fd3700c7c439d6ea969afcba2d2656d5b123f (patch)
tree1c396a30edd3fb29393b01ad5a013422378a6bbe /app/models/info_request.rb
parenta6e6650c0645ca54f2be0f25303bccb8ea38ef83 (diff)
Remove hardcoded status list from InfoRequestEvent, use InfoRequest one instead
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index c667e1499..67ebd01b0 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -779,8 +779,7 @@ public
# Display version of status
- def display_status
- status = self.calculate_status
+ def InfoRequest.get_status_description(status)
if status == 'waiting_classification'
_("Awaiting classification.")
elsif status == 'waiting_response'
@@ -818,6 +817,10 @@ public
end
end
+ def display_status
+ InfoRequest.get_status_description(self.calculate_status)
+ end
+
# Completely delete this request and all objects depending on it
def fully_destroy
self.track_things.each do |track_thing|