aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request_event.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-09-20 15:06:32 +0100
committerLouise Crow <louise.crow@gmail.com>2012-09-20 15:06:32 +0100
commitadd084ee6047d3cae72e3e445135b122d8ba2cc8 (patch)
treef9763b73753c44562d6572035ab71b4bae2957a0 /app/models/info_request_event.rb
parent69103f5e83d538cd3aa9a3ea39cc5736aaec21e8 (diff)
parentaebcdc082f277b3569d1300ebeda43c503d8aec5 (diff)
Merge branch 'release/0.6.6'0.6.6
Conflicts: locale/cs/app.po locale/es/app.po
Diffstat (limited to 'app/models/info_request_event.rb')
-rw-r--r--app/models/info_request_event.rb22
1 files changed, 2 insertions, 20 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index a827d19a4..54d2f5ef7 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -43,7 +43,7 @@ class InfoRequestEvent < ActiveRecord::Base
'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)
@@ -53,7 +53,7 @@ class InfoRequestEvent < ActiveRecord::Base
'move_request', # changed user or public body (in admin interface)
'hide', # hid a request (in admin interface)
'manual', # you did something in the db by hand
-
+
'response',
'comment',
'status_update'
@@ -389,24 +389,6 @@ class InfoRequestEvent < ActiveRecord::Base
return TMail::Address.parse(prev_addr).address == TMail::Address.parse(curr_addr).address
end
- # Given a find condition clause, creates a league table of users who made those events.
- # XXX this isn't very generic yet, it is just used for the categorisation game tables.
- def InfoRequestEvent.make_league_table(conditions)
- status_update_events = InfoRequestEvent.find(:all, :conditions => conditions)
- table = Hash.new { |h,k| h[k] = 0 }
- for event in status_update_events
- user_id = event.params[:user_id]
- table[user_id] += 1
- end
- league_table = []
- for user_id, count in table
- user = User.find(user_id)
- league_table.push([user, count])
- end
- league_table.sort! { |a,b| b[1] <=> a[1] }
- return league_table
- end
-
def json_for_api(deep, snippet_highlight_proc = nil)
ret = {
:id => self.id,