aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request_event.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/info_request_event.rb')
-rw-r--r--app/models/info_request_event.rb45
1 files changed, 24 insertions, 21 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 9ce191f6b..a410328b0 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 108
+# Schema version: 114
#
# Table name: info_request_events
#
@@ -39,25 +39,26 @@ class InfoRequestEvent < ActiveRecord::Base
def self.enumerate_event_types
[
- 'sent',
- 'resent',
- 'followup_sent',
- 'followup_resent',
-
- 'edit', # title etc. edited (in admin interface)
- 'edit_outgoing', # outgoing message edited (in admin interface)
- 'edit_comment', # comment edited (in admin interface)
- 'destroy_incoming', # deleted an incoming message (in admin interface)
- 'destroy_outgoing', # deleted an outgoing message (in admin interface)
- 'redeliver_incoming', # redelivered an incoming message elsewhere (in admin interface)
- 'move_request', # changed user or public body (in admin interface)
- 'manual', # you did something in the db by hand
-
- 'response',
- 'comment',
- 'status_update',
+ 'sent',
+ 'resent',
+ 'followup_sent',
+ 'followup_resent',
+
+ 'edit', # title etc. edited (in admin interface)
+ 'edit_outgoing', # outgoing message edited (in admin interface)
+ 'edit_comment', # comment edited (in admin interface)
+ 'destroy_incoming', # deleted an incoming message (in admin interface)
+ 'destroy_outgoing', # deleted an outgoing message (in admin interface)
+ 'redeliver_incoming', # redelivered an incoming message elsewhere (in admin interface)
+ 'move_request', # changed user or public body (in admin interface)
+ 'manual', # you did something in the db by hand
+
+ 'response',
+ 'comment',
+ 'status_update'
]
end
+
validates_inclusion_of :event_type, :in => enumerate_event_types
# user described state (also update in info_request)
@@ -440,7 +441,9 @@ class InfoRequestEvent < ActiveRecord::Base
return ret
end
-
+ def for_admin_column
+ self.class.content_columns.each do |column|
+ yield(column.human_name, self.send(column.name), column.type.to_s, column.name)
+ end
+ end
end
-
-