* Align ModelContract validate/valid? methods with ActiveModel::Validations
* Add BaseContract to allow contracts on non ActiveRecord resources
* Avoid using alias_method as that won't work with subclasses
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.
Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
Replaces reform by a simple layer of Disposable +
ActiveModel::Validations for contracts.
Additionally removes the custom error handling where OpenProject added
symbols to keep the ability to identify faulty attributes while having
non standard format (deviates from `%{attribute} %{message}`).
Changes to active record now allow us to define the format of a message
on i18n level, e.g. `%{message}`. Therefore the patching can be removed.
Reform plans to remove support for ActiveModel::Validations in version
4.0 at the latest but even today, support for it is hapazard. As we do
not need the full stack of Reform anyway, we can solely rely on
Disposable.
* turn custom action into fully fledged resource
* add description to custom action model
* load custom action resource on mouse over and display in title