diff --git a/app/controllers/discussions_controller.rb b/app/controllers/discussions_controller.rb index 2036e859..67779eeb 100644 --- a/app/controllers/discussions_controller.rb +++ b/app/controllers/discussions_controller.rb @@ -20,7 +20,7 @@ def index end def popular - @days = params[:days].to_i + @days = (params[:days] || 7).to_i @days = 180 if @days > 180 @exchanges = Discussion.popular_in_the_last(@days.days) .viewable_by(current_user).page(params[:page])