diff options
Diffstat (limited to 'spec/models/customstates.rb')
-rw-r--r-- | spec/models/customstates.rb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/spec/models/customstates.rb b/spec/models/customstates.rb index de8d04ffb..406d4ead9 100644 --- a/spec/models/customstates.rb +++ b/spec/models/customstates.rb @@ -1,4 +1,9 @@ module InfoRequestCustomStates + + def self.included(base) + base.extend(ClassMethods) + end + # Mixin methods for InfoRequest def theme_display_status(status) if status == 'deadline_extended' @@ -10,12 +15,6 @@ module InfoRequestCustomStates end end - def theme_extra_states - return ['deadline_extended', - 'wrong_response'] - 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 +40,12 @@ module InfoRequestCustomStates return Holiday.due_date_from(self.date_response_required_by, 15) end + module ClassMethods + def theme_extra_states + return ['deadline_extended', + 'wrong_response'] + end + end end module RequestControllerCustomStates |