mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
Set inverse_of on project boards association.
git-svn-id: http://svn.redmine.org/redmine/trunk@16659 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
08e2f2bf96
commit
261292445f
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user