summaryrefslogtreecommitdiffstats
path: root/app/models/board.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-22 18:41:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-22 18:41:03 +0000
commit498a34403ad3f15dee2067e9d8998675255010ce (patch)
tree4157bab01de3ac07d5d076cc3eeb988df1d2a993 /app/models/board.rb
parent0fc1906201be897fb1d7b1424cd3955f0e224eb4 (diff)
downloadredmine-498a34403ad3f15dee2067e9d8998675255010ce.tar.gz
redmine-498a34403ad3f15dee2067e9d8998675255010ce.zip
Removed unneeded :foreign_key option on belongs_to associations.
git-svn-id: http://svn.redmine.org/redmine/trunk@13484 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/board.rb')
-rw-r--r--app/models/board.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/board.rb b/app/models/board.rb
index 2cbeb0a8a..4a9984a03 100644
--- a/app/models/board.rb
+++ b/app/models/board.rb
@@ -20,7 +20,7 @@ class Board < ActiveRecord::Base
belongs_to :project
has_many :topics, lambda {where("#{Message.table_name}.parent_id IS NULL").order("#{Message.table_name}.created_on DESC")}, :class_name => 'Message'
has_many :messages, lambda {order("#{Message.table_name}.created_on DESC")}, :dependent => :destroy
- belongs_to :last_message, :class_name => 'Message', :foreign_key => :last_message_id
+ 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_watchable