diff options
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r-- | app/models/custom_field.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index ad87aa34e..a1373d12b 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -18,6 +18,10 @@ class CustomField < ActiveRecord::Base include Redmine::SubclassFactory + has_many :enumerations, + lambda { order(:position) }, + :class_name => 'CustomFieldEnumeration', + :dependent => :delete_all has_many :custom_values, :dependent => :delete_all has_and_belongs_to_many :roles, :join_table => "#{table_name_prefix}custom_fields_roles#{table_name_suffix}", :foreign_key => "custom_field_id" acts_as_list :scope => 'type = \'#{self.class}\'' |