summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/my_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index b39dc1c9c..5ae55e6ff 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -139,8 +139,8 @@ class MyController < ApplicationController
# params[:list-(top|left|right)] : array of block ids of the group
def order_blocks
group = params[:group]
- if group.is_a?(Array)
- group_items = params["list-#{group}"].collect(&:underscore)
+ if group.is_a?(String)
+ group_items = (params["list-#{group}"] || []).collect(&:underscore)
if group_items and group_items.is_a? Array
# remove group blocks if they are presents in other groups
%w(top left right).each {|f|