Skip to content

Commit

Permalink
ddd
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacioria committed Nov 3, 2012
1 parent f3c285e commit 1d8a900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/videos_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def friends

def sort_by_dateish(list)
with_date = list.find_all{|x| x[:action_date].nil? == false}.sort_by{|x|x[:action_date]}
without_date = list.find_all{|x| x[:action_date].nil?}
without_date = list.find_all{|x| x[:action_date].nil?}.reverse
map_factor = without_date.count.to_f / (with_date.count+1)
(0...without_date.count).each {|i|
with_date.insert([i * map_factor, with_date.count].min , without_date[i])
Expand Down

0 comments on commit 1d8a900

Please sign in to comment.