Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

remove unnecessary type lookup

ulferts0194981f16ed
diff --git a/app/models/action.rb b/app/models/action.rb
index 903bacbe46f..0ae3927bf26 100644
--- a/app/models/action.rb
+++ b/app/models/action.rb
@@ -34,8 +34,8 @@ class Action < ApplicationRecord
default_scope { default }
- attribute :id, ActiveRecord::Type.lookup(:text), default: nil
- attribute :permission, ActiveRecord::Type.lookup(:text), default: nil
- attribute :global, ActiveRecord::Type.lookup(:boolean), default: false
- attribute :module, ActiveRecord::Type.lookup(:text), default: false
+ attribute :id, :text, default: nil
+ attribute :permission, :text, default: nil
+ attribute :global, :boolean, default: false
+ attribute :module, :text, default: false
end
diff --git a/app/models/capability.rb b/app/models/capability.rb
index 8eb8748e16a..1d7c9729835 100644
--- a/app/models/capability.rb
+++ b/app/models/capability.rb
@@ -37,7 +37,7 @@ class Capability < ApplicationRecord
belongs_to :context, class_name: "Project"
belongs_to :principal
- attribute :action, ActiveRecord::Type.lookup(:text), default: nil
- attribute :context_id, ActiveRecord::Type.lookup(:integer), default: nil
- attribute :principal_id, ActiveRecord::Type.lookup(:integer), default: nil
+ attribute :action, :text, default: nil
+ attribute :context_id, :integer, default: nil
+ attribute :principal_id, :integer, default: nil
end
diff --git a/app/models/day.rb b/app/models/day.rb
index 1a14256a02f..6c006389c79 100644
--- a/app/models/day.rb
+++ b/app/models/day.rb
@@ -36,9 +36,9 @@ class Day < ApplicationRecord
primary_key: :date,
dependent: nil
- attribute :date, ActiveRecord::Type.lookup(:date), default: nil
- attribute :day_of_week, ActiveRecord::Type.lookup(:integer), default: nil
- attribute :working, ActiveRecord::Type.lookup(:boolean), default: "t"
+ attribute :date, :date, default: nil
+ attribute :day_of_week, :integer, default: nil
+ attribute :working, :boolean, default: "t"
delegate :name, to: :week_day, allow_nil: true