summaryrefslogtreecommitdiffstats
path: root/app/models/enumeration.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-25 17:13:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-25 17:13:58 +0000
commit8db9ecef08ee8afe600bdb2d95ead0162b8b43d4 (patch)
treeecf477a4dd955203267a82331cfca67b090b781a /app/models/enumeration.rb
parent9fb40b1a2f700ce6e5bd31438fe9c9ef737555ab (diff)
downloadredmine-8db9ecef08ee8afe600bdb2d95ead0162b8b43d4.tar.gz
redmine-8db9ecef08ee8afe600bdb2d95ead0162b8b43d4.zip
Removes column opt in enumerations table.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3240 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/enumeration.rb')
-rw-r--r--app/models/enumeration.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb
index 4836229b1..3b7a434a7 100644
--- a/app/models/enumeration.rb
+++ b/app/models/enumeration.rb
@@ -29,36 +29,6 @@ class Enumeration < ActiveRecord::Base
validates_presence_of :name
validates_uniqueness_of :name, :scope => [:type, :project_id]
validates_length_of :name, :maximum => 30
-
- # Backwards compatiblity named_scopes.
- # Can be removed post-0.9
- named_scope :priorities, :conditions => { :type => "IssuePriority" }, :order => 'position' do
- ActiveSupport::Deprecation.warn("Enumeration#priorities is deprecated, use the IssuePriority class. (#{Redmine::Info.issue(3007)})")
- def default
- find(:first, :conditions => { :is_default => true })
- end
- end
-
- named_scope :document_categories, :conditions => { :type => "DocumentCategory" }, :order => 'position' do
- ActiveSupport::Deprecation.warn("Enumeration#document_categories is deprecated, use the DocumentCategories class. (#{Redmine::Info.issue(3007)})")
- def default
- find(:first, :conditions => { :is_default => true })
- end
- end
-
- named_scope :activities, :conditions => { :type => "TimeEntryActivity" }, :order => 'position' do
- ActiveSupport::Deprecation.warn("Enumeration#activities is deprecated, use the TimeEntryActivity class. (#{Redmine::Info.issue(3007)})")
- def default
- find(:first, :conditions => { :is_default => true })
- end
- end
-
- named_scope :values, lambda {|type| { :conditions => { :type => type }, :order => 'position' } } do
- def default
- find(:first, :conditions => { :is_default => true })
- end
- end
- # End backwards compatiblity named_scopes
named_scope :shared, :conditions => { :project_id => nil }
named_scope :active, :conditions => { :active => true }
@@ -80,12 +50,6 @@ class Enumeration < ActiveRecord::Base
nil
end
- # Backwards compatiblity. Can be removed post-0.9
- def opt
- ActiveSupport::Deprecation.warn("Enumeration#opt is deprecated, use the STI classes now. (#{Redmine::Info.issue(3007)})")
- return OptName
- end
-
def before_save
if is_default? && is_default_changed?
Enumeration.update_all("is_default = #{connection.quoted_false}", {:type => type})