Fix max_actions being nil when actions_open_per_week list is empty

This commit is contained in:
Stefan Hacker 2012-09-03 20:32:26 +02:00
parent 7f4065b16b
commit e6afd0ac0a

View file

@ -179,7 +179,7 @@ class StatsController < ApplicationController
@actions_open_per_week_array = convert_to_weeks_running_from_today_array(@actions_started, @max_weeks+1)
@actions_open_per_week_array = cut_off_array(@actions_open_per_week_array, @count)
@max_actions = @actions_open_per_week_array.max
@max_actions = (@actions_open_per_week_array.max or 0)
render :layout => false
end