Patch #2971 ยป mypage_order_fix.patch
| app/controllers/my_controller.rb (working copy) | ||
|---|---|---|
| 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|
|