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 no longer required method for falling back on unknown properties

ulfertscc8305566808
diff --git a/app/contracts/base_contract.rb b/app/contracts/base_contract.rb
index 6314a653e8c..39f2b7f0ee6 100644
--- a/app/contracts/base_contract.rb
+++ b/app/contracts/base_contract.rb
@@ -125,16 +125,6 @@ class BaseContract < Disposable::Twin
@options = options
end
- # TODO: This should be removable here and in the subclasses
- # we want to add a validation error whenever someone sets a property that we don't know.
- # However AR will cleverly try to resolve the value for erroneous properties. Thus we need
- # to hook into this method and return nil for unknown properties to avoid NoMethod errors...
- def read_attribute_for_validation(attribute)
- if respond_to? attribute
- send attribute
- end
- end
-
def writable_attributes
@writable_attributes ||= reduce_writable_attributes(collect_writable_attributes)
end
@@ -175,7 +165,6 @@ class BaseContract < Disposable::Twin
end
end
- # TODO: check if this can be removed
# use activerecord as the base scope instead of 'activemodel' to be compatible
# to the messages we have already stored
def self.i18n_scope