Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 85ed80d

Browse files
committed
add safe_attributes for CustomField patch
1 parent 26819ed commit 85ed80d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## [1.0.6](https://github.com/annikoff/redmine_plugin_computed_custom_field/releases/tag/v1.0.6) - 2017-07-18
3+
## [1.0.6](https://github.com/annikoff/redmine_plugin_computed_custom_field/releases/tag/v1.0.6) - 2017-08-07
44
### Added
55
- Redmine 3.4.x support.
66

lib/computed_custom_field/custom_field_patch.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module CustomFieldPatch
55
included do
66
before_validation -> { self.formula ||= '' }, if: :is_computed?
77
validates_with FormulaValidator, if: :is_computed?
8+
safe_attributes 'is_computed', 'formula' if CustomField.respond_to? 'safe_attributes'
89
end
910

1011
def is_computed=(arg)

0 commit comments

Comments
 (0)