Project

General

Profile

« Previous | Next » 

Revision 2634

Fixes that "My Page" personalization was not storing reordered blocks (#2971).

View differences:

trunk/app/controllers/my_controller.rb
139 139
  # params[:list-(top|left|right)] : array of block ids of the group
140 140
  def order_blocks
141 141
    group = params[:group]
142
    if group.is_a?(Array)
143
      group_items = params["list-#{group}"].collect(&:underscore)
142
    if group.is_a?(String)
143
      group_items = (params["list-#{group}"] || []).collect(&:underscore)
144 144
      if group_items and group_items.is_a? Array
145 145
        # remove group blocks if they are presents in other groups
146 146
        %w(top left right).each {|f|

Also available in: Unified diff