OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/open_project/costs/patches/project_patch.rb

21 lines
651 B

require_dependency 'project'
module OpenProject::Costs::Patches::ProjectPatch
def self.included(base) # :nodoc:
# Same as typing in the class
base.class_eval do
unloadable
has_many :cost_objects, :dependent => :destroy
has_many :rates, :class_name => 'HourlyRate'
has_many :member_groups, :class_name => 'Member',
:include => :principal,
:conditions => "#{Principal.table_name}.type='Group'"
has_many :groups, :through => :member_groups, :source => :principal
end
end
end
Project.send(:include, OpenProject::Costs::Patches::ProjectPatch)