summaryrefslogtreecommitdiffstats
path: root/app/models
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
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')
-rw-r--r--app/models/document_category.rb2
-rw-r--r--app/models/enumeration.rb36
-rw-r--r--app/models/issue_priority.rb2
-rw-r--r--app/models/time_entry_activity.rb2
4 files changed, 0 insertions, 42 deletions
diff --git a/app/models/document_category.rb b/app/models/document_category.rb
index e04db7d16..0355b9185 100644
--- a/app/models/document_category.rb
+++ b/app/models/document_category.rb
@@ -19,8 +19,6 @@ class DocumentCategory < Enumeration
has_many :documents, :foreign_key => 'category_id'
OptionName = :enumeration_doc_categories
- # Backwards compatiblity. Can be removed post-0.9
- OptName = 'DCAT'
def option_name
OptionName
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})
diff --git a/app/models/issue_priority.rb b/app/models/issue_priority.rb
index cea0f0635..81c817b39 100644
--- a/app/models/issue_priority.rb
+++ b/app/models/issue_priority.rb
@@ -19,8 +19,6 @@ class IssuePriority < Enumeration
has_many :issues, :foreign_key => 'priority_id'
OptionName = :enumeration_issue_priorities
- # Backwards compatiblity. Can be removed post-0.9
- OptName = 'IPRI'
def option_name
OptionName
diff --git a/app/models/time_entry_activity.rb b/app/models/time_entry_activity.rb
index 8e3567156..4a612ac9f 100644
--- a/app/models/time_entry_activity.rb
+++ b/app/models/time_entry_activity.rb
@@ -19,8 +19,6 @@ class TimeEntryActivity < Enumeration
has_many :time_entries, :foreign_key => 'activity_id'
OptionName = :enumeration_activities
- # Backwards compatiblity. Can be removed post-0.9
- OptName = 'ACTI'
def option_name
OptionName