Allow projects to have many boards
This commit is contained in:
parent
38978fa53f
commit
fb5a420206
2 changed files with 2 additions and 3 deletions
|
@ -65,8 +65,7 @@ class Project < ActiveRecord::Base
|
|||
belongs_to :namespace
|
||||
|
||||
has_one :last_event, -> {order 'events.created_at DESC'}, class_name: 'Event', foreign_key: 'project_id'
|
||||
|
||||
has_one :board, dependent: :destroy
|
||||
has_many :boards, dependent: :destroy
|
||||
|
||||
# Project services
|
||||
has_many :services
|
||||
|
|
|
@ -24,7 +24,7 @@ describe Project, models: true do
|
|||
it { is_expected.to have_one(:slack_service).dependent(:destroy) }
|
||||
it { is_expected.to have_one(:pushover_service).dependent(:destroy) }
|
||||
it { is_expected.to have_one(:asana_service).dependent(:destroy) }
|
||||
it { is_expected.to have_one(:board).dependent(:destroy) }
|
||||
it { is_expected.to have_many(:boards).dependent(:destroy) }
|
||||
it { is_expected.to have_one(:campfire_service).dependent(:destroy) }
|
||||
it { is_expected.to have_one(:drone_ci_service).dependent(:destroy) }
|
||||
it { is_expected.to have_one(:emails_on_push_service).dependent(:destroy) }
|
||||
|
|
Loading…
Reference in a new issue