summaryrefslogtreecommitdiffstats
path: root/app/controllers/my_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-26 18:11:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-26 18:11:56 +0000
commitc77806738adaf718642c93c1db1be3dab2bc6e37 (patch)
tree01a23a307786659b846918275e6e3ca849f6a9b4 /app/controllers/my_controller.rb
parentb2a6176828ff341f5a9f62852a144b08bb88342b (diff)
downloadredmine-c77806738adaf718642c93c1db1be3dab2bc6e37.tar.gz
redmine-c77806738adaf718642c93c1db1be3dab2bc6e37.zip
Fixes that "My Page" personalization was not storing reordered blocks (#2971).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2634 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-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|