Skip to content

Commit

Permalink
remove limit of 100 experiments for group
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebaker committed Jul 24, 2013
1 parent 3283924 commit f29d600
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions app/controllers/abingo_dashboard_controller.rb
Expand Up @@ -118,20 +118,6 @@ def group_experiments(experiments)
grouped_experiments[potential_group] << e.id
end

grouped_experiments.each do |group, experiment_ids|
limit = 100
if experiment_ids.length > limit
top_ids = Abingo::Alternative.find(:all,
:select => 'experiment_id, SUM(participants) AS total',
:conditions => {:experiment_id => experiment_ids},
:group => :experiment_id,
:order => 'total DESC',
:limit => limit
).map{|a| a.experiment_id }
grouped_experiments[group] = top_ids
end
end

grouped_experiments
end

Expand Down

0 comments on commit f29d600

Please sign in to comment.