aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-09-01 03:52:15 +0200
committerDavid Cabo <david@calibea.com>2011-09-01 03:52:15 +0200
commit4218b4f5f0c23f8d99d93ef9dd2148a92497d724 (patch)
treef0e6913d60eaf2ce6190fa4dca8e2d2e0b4149c6
parent6a7c9cdd3c5bf3db7701ef1353f04527e96c8cc3 (diff)
Due to ca6fd3700c7c439d6ea969afcba2d2656d5b123f, theme_display_status for custom states needs to be a class method
-rw-r--r--spec/models/customstates.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/models/customstates.rb b/spec/models/customstates.rb
index 406d4ead9..3488e6730 100644
--- a/spec/models/customstates.rb
+++ b/spec/models/customstates.rb
@@ -5,16 +5,6 @@ module InfoRequestCustomStates
end
# Mixin methods for InfoRequest
- def theme_display_status(status)
- if status == 'deadline_extended'
- _("Deadline extended.")
- elsif status == 'wrong_response'
- _("Wrong Response.")
- else
- raise _("unknown status ") + status
- end
- end
-
def theme_calculate_status
return 'waiting_classification' if self.awaiting_description
waiting_response = self.described_state == "waiting_response" || self.described_state == "deadline_extended"
@@ -41,6 +31,16 @@ module InfoRequestCustomStates
end
module ClassMethods
+ def theme_display_status(status)
+ if status == 'deadline_extended'
+ _("Deadline extended.")
+ elsif status == 'wrong_response'
+ _("Wrong Response.")
+ else
+ raise _("unknown status ") + status
+ end
+ end
+
def theme_extra_states
return ['deadline_extended',
'wrong_response']