aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request_event.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-05-23 01:53:38 -0700
committerSeb Bacon <seb.bacon@gmail.com>2012-05-23 01:53:38 -0700
commit8300398b9f4666c102d6c205f1b94e00b8017014 (patch)
treebfecc1ae98ff202e4063714c267afde0692f1ca7 /app/models/info_request_event.rb
parent20b2a3c493d19b1ea66ba2605053af05f0595f7f (diff)
parent820e124c20865c17eeea2e17c5bb82da620ada5b (diff)
Merge pull request #493 from sebbacon/feature/merge-wombleton-sparkly-admin-css
Merge @wombleton sparkly admin css
Diffstat (limited to 'app/models/info_request_event.rb')
-rw-r--r--app/models/info_request_event.rb43
1 files changed, 23 insertions, 20 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 9ce191f6b..dacd3223e 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -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
-
-