Project

General

Profile

Actions

Patch #26727

closed

udpate_all

Added by jwjw yy over 7 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

/app/controllers/wiki_controller.rb
272        @page.children.each do |child|
273          child.update_attribute(:parent, reassign_to)
274        end

could use

@page.children.update_all(parent: reassign_to)

Actions #1

Updated by Toshi MARUYAMA over 7 years ago

  • Description updated (diff)
  • Category set to Code cleanup/refactoring
  • Status changed from New to Needs feedback

Please post by patch.

Actions #2

Updated by Toshi MARUYAMA over 7 years ago

Toshi MARUYAMA wrote:

Please post by patch.

Please post by attachment patch file.

Actions #3

Updated by Go MAEDA over 2 years ago

I don't think the `update_attribute` can be replaced with `update_all` because it does not invoke callbacks.

Actions #4

Updated by Go MAEDA over 1 year ago

  • Status changed from Needs feedback to Closed
Actions

Also available in: Atom PDF