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

Allow options to be passed to property twin

Oliver Güntherefa3ada976ad
diff --git a/app/contracts/base_contract.rb b/app/contracts/base_contract.rb
index be5bbe32ef2..ed2c12951fe 100644
--- a/app/contracts/base_contract.rb
+++ b/app/contracts/base_contract.rb
@@ -82,7 +82,7 @@ class BaseContract < Disposable::Twin
end
def attribute(attribute, options = {}, &block)
- property attribute
+ property attribute, options.slice(:readable)
add_writable(attribute, options[:writeable])
attribute_permission(attribute, options[:permission])
diff --git a/modules/budgets/app/contracts/budgets/base_contract.rb b/modules/budgets/app/contracts/budgets/base_contract.rb
index 74f77163609..ece6c30e1fe 100644
--- a/modules/budgets/app/contracts/budgets/base_contract.rb
+++ b/modules/budgets/app/contracts/budgets/base_contract.rb
@@ -40,7 +40,6 @@ module Budgets
attribute :description
attribute :fixed_date
attribute :project
- attribute :author
attribute :new_material_budget_item_attributes,
readable: false