From 64afa24a7f72526a2cbf6761e51b6cd326aa0c36 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 17 Apr 2016 06:57:20 +0000 Subject: Replaces acts_as_list with an implementation that handles #position= (#12909). Objects are reordered using the regular attribute writer #position= and AR callbacks. git-svn-id: http://svn.redmine.org/redmine/trunk@15335 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/board.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/board.rb') diff --git a/app/models/board.rb b/app/models/board.rb index d62f863c4..104c85749 100644 --- a/app/models/board.rb +++ b/app/models/board.rb @@ -21,7 +21,7 @@ class Board < ActiveRecord::Base has_many :messages, lambda {order("#{Message.table_name}.created_on DESC")}, :dependent => :destroy belongs_to :last_message, :class_name => 'Message' acts_as_tree :dependent => :nullify - acts_as_list :scope => '(project_id = #{project_id} AND parent_id #{parent_id ? "= #{parent_id}" : "IS NULL"})' + acts_as_positioned :scope => [:project_id, :parent_id] acts_as_watchable validates_presence_of :name, :description -- cgit v1.2.3