[#4177] Added Contract associations.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
class Contract < ActiveRecord::Base
|
||||
unloadable
|
||||
|
||||
# Associations
|
||||
belongs_to :project
|
||||
belongs_to :account_executive, :class_name => 'User', :foreign_key => 'account_executive_id'
|
||||
|
||||
end
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class ContractTest < ActiveSupport::TestCase
|
||||
should_belong_to :account_executive
|
||||
should_belong_to :project
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user