Commit c4b85c99 authored by jplang's avatar jplang

Set inverse_of on project boards association.

git-svn-id: https://svn.redmine.org/redmine/trunk@16659 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3750f518
......@@ -25,7 +25,7 @@ class BoardsController < ApplicationController
helper :watchers
def index
@boards = @project.boards.preload(:project, :last_message => :author).to_a
@boards = @project.boards.preload(:last_message => :author).to_a
# show the board if there is only one
if @boards.size == 1
@board = @boards.first
......
......@@ -45,7 +45,7 @@ class Project < ActiveRecord::Base
has_many :documents, :dependent => :destroy
has_many :news, lambda {includes(:author)}, :dependent => :destroy
has_many :issue_categories, lambda {order(:name)}, :dependent => :delete_all
has_many :boards, lambda {order(:position)}, :dependent => :destroy
has_many :boards, lambda {order(:position)}, :inverse_of => :project, :dependent => :destroy
has_one :repository, lambda {where(:is_default => true)}
has_many :repositories, :dependent => :destroy
has_many :changesets, :through => :repository
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment